BashScripts.org
http://bashscripts.org/forum/

Script to launch browser tools
http://bashscripts.org/forum/viewtopic.php?f=15&t=1131
Page 1 of 1

Author:  deibertine [ Mon Jun 28, 2010 1:10 pm ]
Post subject:  Script to launch browser tools

Hi - This might be a general question but I need to write a batch script that would do the following:
- Batch that would launch an initiation script to start process
- Once initiation script is done, launch another batch file which will launch the "fix" script and rectify whatever the first initiation left off.
The initiation and fix scripts both run on an IE browser such:
initiation: http://website.com/ports/initiationinfo ... owersource
fix: http://website.com/ports/initiationinfo ... sourcetrue
What Im trying to accomplish here is to automate this process instead of watching/launching each step which could be cumbersome at times.
1st script:
Call ViewHtml( "http://website.com/ports/initiationinfo=srvc=powersource", False )
Sub ViewHtml( ByVal sFile, ByVal bWait )
Dim oWsh
Const sgExeFile = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Const sWINDOWSTYLE = 3
If bWait = Empty Then
bWait = False
End If
Set oWsh = WScript.CreateObject("WScript.Shell")
oWsh.Run CHR(34) & sgExeFile & CHR(34) & " " & sFile, sWINDOWSTYLE, bWait
Set oWsh = Nothing
End Sub
===============================
2nd script:
Call ViewHtml( "http://website.com/ports/initiationinfo=FIXsrvc=powersourcetrue", False )
Sub ViewHtml( ByVal sFile, ByVal bWait )
Dim oWsh
Const sgExeFile = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Const sWINDOWSTYLE = 3
If bWait = Empty Then
bWait = False
End If
Set oWsh = WScript.CreateObject("WScript.Shell")
oWsh.Run CHR(34) & sgExeFile & CHR(34) & " " & sFile, sWINDOWSTYLE, bWait
Set oWsh = Nothing
End Sub
==========================
Im hoping to put this together in one script kind of like this order:
1st script launches > wait xx amount of secs > start 2nd script > wait xx amount of secs > loopback to 1st script > wait xx amount of secs > start 2nd script >wait xx amount of secs
...looping probably 3 times to get bases covered and fixed all left over errors.

The above is a vbscript but hoping to generate a bash instead to make life a little easier to code. :-)
Any advise would be much appreciated!
Cheers!
DB

Author:  Watael [ Mon Jun 28, 2010 7:36 pm ]
Post subject:  Re: Script to launch browser tools

oh no! I won't translate your VBscript into GNU/Bash

you're working on Windows, using Windows events, wanting to interfere with Windows interface;
you'd better keep on using Windows tools.

Author:  deibertine [ Tue Jun 29, 2010 11:34 am ]
Post subject:  Re: Script to launch browser tools

I actually got it written now on batch script. :-)

The only piece I am trying to figure out is the "auto login" part where the script goes to the site then auto logs in with the username and password.

Page 1 of 1 All times are UTC - 6 hours
© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com