Jump to content

Same browser window.


Recommended Posts

I searched the forums before posting this topic but couldnt find an answer. I have this script to log into a website and race other people without actually me doing it.

I just want it so it logs in (Which I've accomplished already) then after that I have some links I want to add into the script that I want it to goto in the same open browser window. How could I do that?

BrowseURL_1('http://www.midnitechallenge.com/index.php?page=1')
Sleep(5000)
Func BrowseURL_1($URL)
    Local $TempFile
    $TempFile = @TempDir & "\Website.url"
    INIWrite($TempFile, "InternetShortcut", "URL", $URL)
    Run(@comspec & ' /c "' & $TempFile & '"', @SystemDir, @SW_HIDE)
EndFunc
HotKeySet ("^e", "MyExit")

While 1
   $Co_ord1 = PixelSearch( 312, 359, 440, 359, 0xFFFFFF, 1, 1)
   If Not @Error Then
      MouseMove ($Co_ord1[0], $Co_ord1[1],0)
      MouseClick("Left")

;Login

Send("LOGIN{TAB}")
Send("PASSWORD{Enter}")
Sleep(1000)
Send("{Enter}")
WinWaitActive("Midnite Challenge.com - ")
EndIf
Wend
Func MyExit ()
   Exit
EndFunc
Link to comment
Share on other sites

And the Registry entry for it is HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\AllowWindowReuse When set to 0 it forces a new window, otherwise reuses (and here's the down-side) the oldest window. If you can change the behaviour to reuse newest window, I'd love to know how :)

601DisengageEnd Program

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...