r0guenj Posted November 24, 2014 Posted November 24, 2014 i am new to scripting and autoit and have a question regarding a simple facebook script i put together. for example, the following button labeled Delete when viewing the element: <a class="_56bs _3cqr _56bt" data-store="{"optimistic_uri":"\/a\/mobile\/friends\/reject?subjectid=100000344478532&fref=m_find_friends&gfid=AQBQH1d5Z99zck5f","optimistic_post_data":null}" href="#" role="button" data-ajaxify-href="" data-sigil="touchable ignore-request ajaxify"><span class="_55sr">Delete</span></a> instead of recording my mouse pointer locations, i want to specify the buttons directly. this is what i came up with so far. it works, but misses buttons occasionally and i think specifying the buttons directly would work better. expandcollapse popup#comments-start AutoIt Version: 3.x.x.x Author: r0guenj Function: This Script will click the refresh page and select the visible delete buttons until stopped. The exit hotkey for this script is CTRL+ALT+x #comments-end ;Assigns the HotKey to our custom exit function HotKeySet("^!x", "MyExit") ; The coordinates to click in pixels $i = 0 While $i <= 10 MouseClick("left",317,148,1) Sleep(500) MouseClick("left",1022,268,1) Sleep(500) MouseClick("left",1030,354,1) Sleep(500) MouseClick("left",1021,437,1) Sleep(500) MouseClick("left",1031,518,1) Sleep(500) MouseClick("left",1033,609,1) Sleep(500) MouseClick("left",1034,700,1) Sleep(500) ; Uncomment the below line to make the script click only 10 times, or until the hotkey is pressed. $i = $i + 1 WEnd Func MyExit() Exit EndFunc is there a way to do this?
Jfish Posted November 24, 2014 Posted November 24, 2014 Could you explain the purpose of your script (i.e. what is actually does)? A better understanding may open up more suggestions. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
Moderators SmOke_N Posted November 25, 2014 Moderators Posted November 25, 2014 Look at the IE* functions in the help file. Run some of the examples. Write some code. If that code fails, post it and tell us what is going on. 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.
r0guenj Posted November 25, 2014 Author Posted November 25, 2014 thanks ill peruse the help files again.
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