spkiller Posted June 21, 2009 Posted June 21, 2009 i want this script to go to a url given by the user and to keep going until they press stop or until the number of times they want it to go ends and i also want it to stop for a period of time also given by the user this is what i have so far expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #include<XProTec.au3> Opt("TrayAutoPause", 0) $Form1 = GUICreate("App Automator", 751, 447) $Tab = GUICtrlCreateTab(8, 8, 737, 425) ;~ ------------------------------------------------------------------------------------ $tab1 = GUICtrlCreateTabItem("Bot 1") $browser1 = _IECreateEmbedded() $GUIActiveX1 = GUICtrlCreateObj($browser1, 300, 150, 430, 250) $URL1 = GUICtrlCreateInput("", 32, 104, 481, 21) $UrlLabel1 = GUICtrlCreateLabel("Url", 32, 80, 17, 17) $PointsLabel1 = GUICtrlCreateLabel("Points Needed per action?", 16, 136, 130, 17) $pointsin1 = GUICtrlCreateInput("", 32, 160, 89, 21) $TimeLabel1 = GUICtrlCreateLabel("Time needed to regain point in miliseconds?", 160, 136, 142, 17) $timein1 = GUICtrlCreateInput("", 176, 160, 105, 21) $start1 = GUICtrlCreateButton("Start", 104, 288, 97, 33, $WS_GROUP) $stop1 = GUICtrlCreateButton("stop", 104, 325, 97, 33, $WS_GROUP) $points1 = GUICtrlRead($pointsin1) $times1 = GUICtrlCreateInput("", 32, 220, 89, 21) $Timesx1 = GUICtrlCreateLabel("Times to do it? -1 = inf", 32, 200, 142, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ; Case $stop1 ; ExitLoop Case $start1 $time1 = GUICtrlRead($times1) $math1 = GUICtrlRead($pointsin1) * GUICtrlRead($timein1) If GUICtrlRead($URL1) <> "" Then If GUICtrlRead($pointsin1) <> "" Then If GUICtrlRead($timein1) <> "" Then ; _IENavigate($browser1, GUICtrlRead($URL1), 1) ; Sleep($math1) ; $time1 = $time1 - 1 $Url = GUICtrlRead($URL1) $Timer = TimerInit() $Update = True Do Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $stop1 ExitLoop EndSwitch If $Update Then _IENavigate($browser1, $Url, 1) $time1 = $time1 - 1 $Update = False EndIf If (TimerDiff($Timer) > $math1) Then $Timer = TimerInit() $Update = True EndIf Until $time1 = 0 Else MsgBox(0, "Your missing stuff", "please put the time it takes to regain a point") EndIf Else MsgBox(0, "Your missing stuff", "Please put the amount of points") EndIf Else MsgBox(0, "Your missing stuff", "please put the url of the action you wish to do") EndIf EndSwitch WEnd any help is greatly appreciated
DCCD Posted June 21, 2009 Posted June 21, 2009 Do not start another "new topic" for this same script.http://www.autoitscript.com/forum/index.php?showtopic=97075 [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
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