4b0082 Posted October 4, 2014 Share Posted October 4, 2014 I'm having trouble figuring out how to code this script, can anyone help me figure this out? Load the webpage (sample.com). Search for "<div>0 of 1 clicks</div>" and if it exists, click it. Refresh the page, search again. If "0 of 1 clicks" isn't found, exit the loop and continue the rest of the script. #include <IE.au3> $oIE = _IECreate("http://sample.com") $oDivs = _IETagNameGetCollection($oIE, "div") For $oDiv in $oDivs If $oDiv.innertext = "0 of 1 clicks" Then _IEAction($oDiv, "click") ExitLoop EndIf Next I can't even get this script to click the div tag, so I'm not sure what I'm doing wrong. The <a> tag surrounding the <div> is dynamically changing each time the page refreshes. Would love some guidance, thanks! Link to comment Share on other sites More sharing options...
mikell Posted October 4, 2014 Share Posted October 4, 2014 Maybe try If StringInStr($oDiv.innertext, "0 of 1 clicks") Then Link to comment Share on other sites More sharing options...
4b0082 Posted October 4, 2014 Author Share Posted October 4, 2014 (edited) Maybe try If StringInStr($oDiv.innertext, "0 of 1 clicks") Then I can get the original part of that script to work (confirmed with checking $oDiv.innertext) but it won't click the link. Edited October 4, 2014 by 4b0082 Link to comment Share on other sites More sharing options...
mikell Posted October 4, 2014 Share Posted October 4, 2014 So maybe this then _IELinkClickByText($oIE, "0 of 1 clicks") If this doesn't work, please provide the page link Link to comment Share on other sites More sharing options...
4b0082 Posted October 4, 2014 Author Share Posted October 4, 2014 Okay, http://www.bing.com/rewards/dashboard - I'm trying to get my script to automatically click and cycle through everything that says "0 of 1 credit". _IELinkClickByText doesn't work even though the text is embedded in a link. What causes it to be unable to click the text? Link to comment Share on other sites More sharing options...
mikell Posted October 4, 2014 Share Posted October 4, 2014 "Bing Rewards isn't available yet in your country or region." Sorry, I have no access to the source and can't guess where is the issue Link to comment Share on other sites More sharing options...
kylomas Posted October 4, 2014 Share Posted October 4, 2014 4b0082,et al., It might be best to let a Mod weigh in on this... kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Developers Jos Posted October 4, 2014 Developers Share Posted October 4, 2014 Okay, http://www.bing.com/rewards/dashboard - I'm trying to get my script to automatically click and cycle through everything that says "0 of 1 credit". _IELinkClickByText doesn't work even though the text is embedded in a link. What causes it to be unable to click the text?care to explain the purpose of all of this? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
4b0082 Posted October 4, 2014 Author Share Posted October 4, 2014 (edited) care to explain the purpose of all of this? Just trying to learn my way around AutoIt by challenging myself with some simple scripts. Bing was something I figured I'd give a shot for learning IE.au3. Edited October 4, 2014 by 4b0082 Link to comment Share on other sites More sharing options...
Developers Jos Posted October 4, 2014 Developers Share Posted October 4, 2014 (edited) Just trying to learn my way around AutoIt by challenging myself with some simple scripts. Bing was something I figured I'd give a shot for learning IE.au3.you are avoiding my question. What is the purpose of this script? Jos Edited October 4, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
4b0082 Posted October 4, 2014 Author Share Posted October 4, 2014 I don't understand the question? It just cycles through unclicked "0 of 1 credit" links on that page and clicks them until they're all clicked. When one of the links is clicked it's turned into a check mark and "0 of 1 credit" disappears. The purpose is to click all of the unclicked links. Link to comment Share on other sites More sharing options...
Danp2 Posted October 5, 2014 Share Posted October 5, 2014 I'm not familiar with Bing rewards. How does this script benefit you? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
4b0082 Posted October 5, 2014 Author Share Posted October 5, 2014 I'm not familiar with Bing rewards. How does this script benefit you? It doesn't really, either way I have to click those links if I want to get a credit. I'm just trying to automate it because I wanted to see if I could do it as a challenge to myself. Bing is Microsoft's search engine, they give you points for up to 30 searches a day and a few other daily activities. Eventually you can exchange them for coupons and stuff, nothing special. Thread is getting derailed. I still just want to know how to get my script working.. Link to comment Share on other sites More sharing options...
Danp2 Posted October 5, 2014 Share Posted October 5, 2014 It does matter if it is in violation of the forum rules. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
4b0082 Posted October 5, 2014 Author Share Posted October 5, 2014 (edited) I'm unaware that it is, but If it's a violation of the forum rules, you shouldn't be posting in this thread. Edited October 5, 2014 by 4b0082 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2014 Moderators Share Posted October 5, 2014 4b0082, I have to click those links if I want to get a credit. I'm just trying to automate itWe do not help automate "click for reward" sites - thread locked. 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...
Recommended Posts