Jump to content

Switch


Recommended Posts

Dim $handleArray[10]
opt("MouseCoordMode", 2)
Global $Paused
HotKeySet("{ESC}", "TogglePause")
For $i = 1 To 10
    $url = "http://www.darkthrone.com/recruiter/index.dt?session="
    $ObjIE = ObjCreate ("InternetExplorer.Application")
    With $ObjIE
        .Visible = True
        .Navigate ($url)
                Do
            Sleep(50)
        Until .ReadyState = 3
    EndWith
    $handleArray[$i - 1] = WinGetHandle(WinGetTitle(""))
Next
For $i = 1 To 35
    For $y = 1 To 10
        WinActivate($handleArray[$y - 1])
        While _IsPressed('01') = 0
            Sleep(100)
        WEnd
        Sleep(150)
    Next
Next
For $i = 1 To 9
    WinClose($handleArray[$i - 1])
Next
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc  ;==>TogglePause
Func _IsPressed($hexKey)
    Local $aR, $bRv
    $hexKey = '0x' & $hexKey
    $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
    If $aR[0] <> 0 Then
        $bRv = 1
    Else
        $bRv = 0
    EndIf
    Return $bRv
EndFunc  ;==>_IsPressed

At the moment this switches pages in order, from 1 - 10. Is it possible to add a bit of code which will make it switch to a Loaded page next?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...