Navigate IE through DOS (1 Viewer)

ajetrumpet

Banned
Local time
Today, 11:51
Joined
Jun 22, 2007
Messages
5,638
Hi Folks. Here is some code to navigate automatically to an IE page in Dos:
Code:
@echo off
@setlocal

:openurl
set url=MY WEB PAGE HERE

if "%url:~0,4%" == "http" (
   start "%ProgramFiles%\Internet Explorer\iexplore.exe" "%url%"
)
if NOT "%url:~0,4%" == "http" (
   start "%ProgramFiles%\Internet Explorer\iexplore.exe" "http://%url%"
)

shift
if "%~1" == "" goto :end
goto :openurl

:end
What I want to do is do the same thing but have it open multiple pages, fill text boxes with login information, and login with the click of the button so I can see what's going on within my accounts. Comments anyone? thanks!

Also, I would like to do it through firefox, but if IE is easier, it really doesn't matter.
 
Last edited:

chergh

blah
Local time
Today, 17:51
Joined
Jun 15, 2004
Messages
1,414
What your after are called command line parameters/arguments. If you google it you should get plenty of results. I found an incomplete list of firefox stuff at http://kb.mozillazine.org/Command_line_arguments

opening multiple pages/browsers/tabs seems pretty trivial but I've no idea about the completing login information stuff. You may also want to have a good think about it as if you are creating a .bat to open stuff all your login information will be stored in plain text which is never a good plan.
 

ajetrumpet

Banned
Local time
Today, 11:51
Joined
Jun 22, 2007
Messages
5,638
thank you for that. I was able to open the windows I needed with this page, but I think the tough part lies ahead...
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 02:51
Joined
Jan 20, 2009
Messages
12,851
I think the tough part lies ahead...

AFAIK there is no way to fill in a form on a web page with DOS.

Please excuse the nostalgia but like many older programmers I have done a lot with DOS. I have a fondness for it and still use it regularly. Such a shame that many younger programmers now consider it obsolete because it had become a surprisingly powerful programming language by the time Microsoft ceased its development. Yet it remained incredibly straightforward and simple.

Sure it has limitations but there are many tasks often done in VB that can be done very efficiently in a single line of DOS.

The king of DOS is the FOR command. Two nested FOR commands with an IF and an ECHO can parse an entire tree of log files from a single line of code.

http://www.computerhope.com/forhlp.htm

Computerhope has the best DOS resource on the internet.
 

Users who are viewing this thread

Top Bottom