Leprechaun Posted April 10, 2005 Share Posted April 10, 2005 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 More sharing options...
Ejoc Posted April 10, 2005 Share Posted April 10, 2005 For IE its under advanced settings, something like 'reuse browser window' Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Smed Posted April 10, 2005 Share Posted April 10, 2005 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 More sharing options...
Leprechaun Posted April 11, 2005 Author Share Posted April 11, 2005 Bleh I tried to do that..but the code I put in below the one above but it didnt do anything after I ran the script..it just kept the original window and didnt do anything. Link to comment Share on other sites More sharing options...
Leprechaun Posted April 11, 2005 Author Share Posted April 11, 2005 Uh Bump^ I tried adding a code after my original code but the browser window dosnt react to it. Just stays the same.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now