sketchin Posted March 11, 2014 Posted March 11, 2014 (edited) Alright, so I am just getting into AutoIT and honestly I am loving it so far. First project was going to be a program to automatically log me into my game account, click the vote page and click the links so I can vote. I seemed to have come across 2 problems and it seems no matter how much I google possible solutions I cannot come up with the answer. 1. I am unable to click these specific links on a page, I got the View Source and the Inspect element, but they share the same ID's and when I plug 1 of them into the source it cannot find it so I am utterly confused about this, links to both will be provided. 2. I am wondering how you click a pre-existing tab in IE since the links I click open a new tab, I need it to select the previous tab to click the other 2 links as well. #include <IE.au3> Call ("signIn") Func signIn () Global $oIE = _IECreate ("www.molten-wow.com/login/") Sleep(5000) ;Variables for Molten Web Page Local $username = _IEGetObjByName ($oIE, "strID");Username Field Local $password = _IEGetObjByName ($oIE, "strPW");Password Field Local $button = _IEGetObjByID ($oIE, "checkBtn");Login Button ;Actions Set by Me _IEFormElementSetValue ($username,"USERNAME");Enter Username _IEFormElementSetValue ($password,"PASSWORD");Enter Password _IEAction ($button, "click");Click Obj Password Button Sleep(1000) _IENavigate($oIE, "https://www.molten-wow.com/account/#1:1:0:0:0") Sleep(2000)) EndFunc The Elements in which I am trying to click <tr> <td> <form id="vform1" action="/account/vote/" method="post" target="_blank"> <input name="id" type="hidden" value="1"> <div class="cpBtn" style="width: 95px; height: 38px;" onclick="document.getElementById('vform1').submit();"> <p style="margin: 11px auto;">Open WoW</p> </div> </form> </td><td> <form id="vform2" action="/account/vote/" method="post" target="_blank"> <input name="id" type="hidden" value="2"> <div class="cpBtn" style="width: 95px; height: 38px;" onclick="document.getElementById('vform2').submit();"> <p style="margin: 11px auto;">XtremeTop100</p> </div> </form> </td><td> <form id="vform3" action="/account/vote/" method="post" target="_blank"> <input name="id" type="hidden" value="3"> <div class="cpBtn" style="width: 95px; height: 38px;" onclick="document.getElementById('vform3').submit();"> <p style="margin: 11px auto;">ArenaTop100</p> </div> </form> </td> </tr> EDIT: I just checked out the view source of it and it doesn't show the buttons at all so I am guessing its loading via javascript which is why autoit cannot detect it. I am curious if there is a way of making the mouse click on the general location of the div? Still working out all the kinks here and boy is there alot of them so far. Edited March 11, 2014 by sketchin
Palestinian Posted March 11, 2014 Posted March 11, 2014 seemed to have come across 3 problems not 2, your 1st problem was not reading the rules of the forums mate, you won't get any help in this area (gaming), its against the rules.
Moderators Melba23 Posted March 11, 2014 Moderators Posted March 11, 2014 sketchin,Palestinian is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. 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
Recommended Posts