Vladi243 Posted June 9, 2008 Posted June 9, 2008 (edited) Hey, I created a browser and I have a problem. Here is the script: expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> Opt("GUIOnEventMode", 1); Change to OnEvent mode _IEErrorHandlerRegister () $oIE1 = _IECreateEmbedded () $oIE2 = _IECreateEmbedded () #Region ### START Koda GUI section ### Form= $Browser = GUICreate("Browser", 650, 450, 185, 145) $First_Group = GUICtrlCreateGroup("First Surf Page", 8, 10, 633, 210) $GUIActiveX1 = GUICtrlCreateObj($oIE1, 25, 50, 600, 160) $GUIActiveX2 = GUICtrlCreateObj($oIE2, 25, 270, 600, 160) $First_Link_Label = GUICtrlCreateLabel("Link", 16, 26, 24, 17) $First_Link_Input = GUICtrlCreateInput("", 48, 24, 225, 21) $Proxy1 = GUICtrlCreateLabel("Proxy", 304, 26, 30, 17) $Proxy1_Input = GUICtrlCreateInput("", 344, 24, 150, 21) $Surf1_Button = GUICtrlCreateButton("Surf", 538, 24, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Second_Group = GUICtrlCreateGroup("Second Surf Page", 8, 230, 633, 210) $Second_Link_Label = GUICtrlCreateLabel("Link", 16, 246, 24, 17) $Second_Link_Input = GUICtrlCreateInput("", 48, 244, 225, 21) $Proxy2 = GUICtrlCreateLabel("Proxy", 304, 246, 30, 17) $Proxy2_Input = GUICtrlCreateInput("", 344, 244, 150, 21) $Surf2_Button = GUICtrlCreateButton("Surf", 538, 244, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;GUICtrlReads $GUICtrlReadFirstLink = GUICtrlRead ($First_Link_Input) $GUICtrlReadSecondLink = GUICtrlRead ($Second_Link_Input) ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Surf1_Button $i=0 Do $i=$i+1 _IENavigate ($oIE1, $GUICtrlReadFirstLink) Sleep (300000) Until $i=100 Case $msg = $Surf2_Button $k=0 Do $k=$k+1 _IENavigate ($oIE2, $GUICtrlReadSecondLink) Sleep (300000) Until $k=1000 EndSelect WEnd GUIDelete() Exit 1. I type the url in the input box, then I click "surf", but it's not working. 2. How can I make that it surf with different proxy in each url? Edited June 9, 2008 by Vladi243
nobbe Posted June 9, 2008 Posted June 9, 2008 you are on event mode and use a message loop - this cant work - then read the edit fields when you click on button - you block the event loop with 100 * sleep (30000) , how long is this ?? for using IE with different proxies you would need to write the ini entry to change it here is something that works expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> ;Opt("GUIOnEventMode", 1); Change to OnEvent mode _IEErrorHandlerRegister () Global $oIE1 = _IECreateEmbedded () Global $oIE2 = _IECreateEmbedded () #Region ### START Koda GUI section ### Form= $Browser = GUICreate("Browser", 650, 450, 185, 145) $First_Group = GUICtrlCreateGroup("First Surf Page", 8, 10, 633, 210) $GUIActiveX1 = GUICtrlCreateObj($oIE1, 25, 50, 600, 160) $GUIActiveX2 = GUICtrlCreateObj($oIE2, 25, 270, 600, 160) $First_Link_Label = GUICtrlCreateLabel("Link", 16, 26, 24, 17) $First_Link_Input = GUICtrlCreateInput("", 48, 24, 225, 21) $Proxy1 = GUICtrlCreateLabel("Proxy", 304, 26, 30, 17) $Proxy1_Input = GUICtrlCreateInput("", 344, 24, 150, 21) $Surf1_Button = GUICtrlCreateButton("Surf", 538, 24, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Second_Group = GUICtrlCreateGroup("Second Surf Page", 8, 230, 633, 210) $Second_Link_Label = GUICtrlCreateLabel("Link", 16, 246, 24, 17) $Second_Link_Input = GUICtrlCreateInput("", 48, 244, 225, 21) $Proxy2 = GUICtrlCreateLabel("Proxy", 304, 246, 30, 17) $Proxy2_Input = GUICtrlCreateInput("", 344, 244, 150, 21) $Surf2_Button = GUICtrlCreateButton("Surf", 538, 244, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Surf1_Button $i=0 ; Do ; $i=$i+1 $GUICtrlReadFirstLink = GUICtrlRead ($First_Link_Input) _IENavigate ($oIE1, $GUICtrlReadFirstLink) ; Sleep (300000) ; Until $i=100 Case $msg = $Surf2_Button ; $k=0 ; Do $GUICtrlReadSecondLink = GUICtrlRead ($Second_Link_Input) ; $k=$k+1 _IENavigate ($oIE2, $GUICtrlReadSecondLink) ; Sleep (300000) ; Until $k=1000 EndSelect WEnd GUIDelete() exit
Linux Posted June 9, 2008 Posted June 9, 2008 (edited) expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> ;Opt("GUIOnEventMode", 1); Change to OnEvent mode YOU DONT WANT TO USE ONEVENT MODE ;_IEErrorHandlerRegister () $oIE1 = _IECreateEmbedded () $oIE2 = _IECreateEmbedded () #Region ### START Koda GUI section ### Form= $Browser = GUICreate("Browser", 650, 450, 185, 145) $First_Group = GUICtrlCreateGroup("First Surf Page", 8, 10, 633, 210) $GUIActiveX1 = GUICtrlCreateObj($oIE1, 25, 50, 600, 160) _IENavigate($oIE1,"http://proxy1.info/nph-index.cgi/011110A/http/checkmyip.com/") $GUIActiveX2 = GUICtrlCreateObj($oIE2, 25, 270, 600, 160) _IENavigate($oIE2,"http://checkmyip.com/") $First_Link_Label = GUICtrlCreateLabel("Link", 16, 26, 24, 17) $First_Link_Input = GUICtrlCreateInput("", 48, 24, 225, 21) $Proxy1 = GUICtrlCreateLabel("Proxy", 304, 26, 30, 17) $Proxy1_Input = GUICtrlCreateInput("", 344, 24, 150, 21) $Surf1_Button = GUICtrlCreateButton("Surf", 538, 24, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Second_Group = GUICtrlCreateGroup("Second Surf Page", 8, 230, 633, 210) $Second_Link_Label = GUICtrlCreateLabel("Link", 16, 246, 24, 17) $Second_Link_Input = GUICtrlCreateInput("", 48, 244, 225, 21) $Proxy2 = GUICtrlCreateLabel("Proxy", 304, 246, 30, 17) $Proxy2_Input = GUICtrlCreateInput("", 344, 244, 150, 21) $Surf2_Button = GUICtrlCreateButton("Surf", 538, 244, 80, 21, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Surf1_Button $i=0 Do $i=$i+1 _IENavigate ($oIE1, GUICtrlRead($First_Link_Input)) Sleep(30000) Until $i=100 Case $msg = $Surf2_Button $k=0 Do $k=$k+1 _IENavigate ($oIE2, GUICtrlRead($Second_Link_Input)) sleep(30000) Until $k=1000 EndSelect WEnd GUIDelete() Exit hope it helps. Edit: Ooops! nobbe posted just before! he is very helpfull! Edited June 9, 2008 by Linux You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Vladi243 Posted June 9, 2008 Author Posted June 9, 2008 Thank you very much guys. nobbe, Can you help me with the ini file and the proxy. I'm newbie in AU3 and I using the help file to learn, but it doesn't always help. BTW, how are you making the "CODE: AutoIt" in the forum? It's much more understandable.
Linux Posted June 9, 2008 Posted June 9, 2008 have you seen my example? Use autoit and /autoit with the [], instead of the CODE tags. You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Vladi243 Posted June 9, 2008 Author Posted June 9, 2008 have you seen my example? Use autoit and /autoit with the [], instead of the CODE tags.Thanks:)
Bert Posted June 9, 2008 Posted June 9, 2008 All this does is embed Internet Explorer in a window. You can use the proxy settings in IE to set what you need. The Vollatran project My blog: http://www.vollysinterestingshit.com/
nobbe Posted June 9, 2008 Posted June 9, 2008 use google to find "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" then use autoit read / write to change ini settings
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