Register
It is currently Mon Sep 01, 2014 8:00 pm

Script to launch browser tools


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Mon Jun 28, 2010 1:10 pm   

Joined: Mon Jun 28, 2010 1:05 pm
Posts: 5
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


Top
 Profile  
 PostPosted: Mon Jun 28, 2010 7:36 pm   

Joined: Mon Mar 02, 2009 3:03 am
Posts: 535
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.


Top
 Profile  
 PostPosted: Tue Jun 29, 2010 11:34 am   

Joined: Mon Jun 28, 2010 1:05 pm
Posts: 5
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.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP