none
Script to launch browser tools RRS feed

  • Question

  • 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=srvc=powersource

    fix: http://website.com/ports/initiationinfo=FIXsrvc=powersourcetrue

    What Im trying to accomplish here is to automate this process instead of watching/launching each step which could be cumbersome at times.

    Any advise would be much appreciated!

    Cheers!

    DB

    Tuesday, June 22, 2010 7:19 PM

All replies

  • Ok kind of got an idea....im trying to check if vbs would do the trick!

    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.

    Can someone advise?

    Cheers.

    DB

    Wednesday, June 23, 2010 6:25 AM