Aston1X Posted May 20, 2010 Share Posted May 20, 2010 So, I'm trying to make the bot search, then search again and again but between each searches have a random sleep interval between 1-60 seconds. I'd also like the word to be different each time. So far all I'm doing is, expandcollapse popup; Script created by Aston1X #include <IE.au3> $Search = "HackForums" $oIE = _IECreate ("http://search.swagbucks.com/") ; This opens Internet Explorer to the SwagBucks search page $oForm = _IEFormGetObjByName($oIE, "search") $oQuery = _IEFormElementGetObjByName($oForm, "q") ; This will find the search box _IEFormElementSetValue($oQuery, $Search) _IEFormSubmit($oForm) _IELoadWait($oIE) ; Usually you don't need the IELoadWait but you do for IEFormSubmit. It just waits till the page has loaded _IENavigate ($oIE, "http://search.swagbucks.com/") $Search = "VirtualFragz" $oForm = _IEFormGetObjByName($oIE, "search") $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, $Search) _IEFormSubmit($oForm) _IELoadWait($oIE) sleep (1000) _IENavigate ($oIE, "http://search.swagbucks.com/") $Search = "Google" $oForm = _IEFormGetObjByName($oIE, "search") $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, $Search) _IEFormSubmit($oForm) _IELoadWait($oIE) sleep (6000) _IENavigate ($oIE, "http://search.swagbucks.com/") $Search = "Facebook" $oForm = _IEFormGetObjByName($oIE, "search") $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, $Search) _IEFormSubmit($oForm) _IELoadWait($oIE) sleep (2000) And so on, but I presume there's an easier way to do this? Any help on how to make this easier would be appreciated. Forget those ; comments They're for my learning. Link to comment Share on other sites More sharing options...
ForsakenGod Posted May 20, 2010 Share Posted May 20, 2010 Take a look at Random() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 20, 2010 Moderators Share Posted May 20, 2010 Aston1X,From the SwagBucks rules page:"Use of any robotic, automatic, programmed or similar entry method or searches that are not deemed by the Sponsor to represent legitimate use of the Search Services will void all entries and result in disqualification."And you want our help to make you money? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 20, 2010 Moderators Share Posted May 20, 2010 Topic locked. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts