rebelblaze Posted February 20, 2013 Posted February 20, 2013 hello autoit peeps im trying to code a script that will do right mouse clicks on one of my apps i need it to do 3 right mouse clicks in different positions with a delay inbetween each click then sleep or wait 3 mins and repeat from 30 to 50 times depending on settings thks
Moderators Melba23 Posted February 20, 2013 Moderators Posted February 20, 2013 rebelblaze,Welcome to the AutoIt forum. We do not write scripts to order - we help you get your own scripts to work. So I suggest you look at the Help file for the following functions: MouseClick, Sleep, TimerInit, TimerDiff, For...Next and see what you can produce. And if you tell us which app you are trying to automate, we may be able to offer more focused advice. 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
rebelblaze Posted February 20, 2013 Author Posted February 20, 2013 (edited) trying to automate office doc for wifes projectHotKeySet("{^!x}", "Terminate") i think this would be ctrl+alt+x?While 1MouseClick("Right",674,422)sleep(5000)MouseClick("Right",673,447)sleep(5000)MouseClick("Right",675,339)sleep(180000)WEndFunc Terminate() Exit 0EndFunccome up with this but wonderign how i would do the clicks 30 to 50 time if i could figure out how to do that partor if i need to seperate code intosections a section for each mouseclick with set number uge confused Edited February 20, 2013 by rebelblaze
Moderators Melba23 Posted February 20, 2013 Moderators Posted February 20, 2013 rebelblaze,Have you looked at the Word UDF? It is much more reliable than simple MouseClicks. And to loop many times look at For...Next in the Help file as I mentioned above. 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
rebelblaze Posted February 20, 2013 Author Posted February 20, 2013 wonder if this would work betterHotKeySet("{^!x}", "Terminate") i think this would be ctrl+alt+x?$counter=1While $counter<=50 MouseClick("Right",674,422)sleep(5000)MouseClick("Right",673,447)sleep(5000)MouseClick("Right",675,339)sleep(180000)$counter=$counter+1WEndFunc Terminate() Exit 0EndFunc
Moderators Melba23 Posted February 20, 2013 Moderators Posted February 20, 2013 rebelblaze,wonder if this would work betterIt looks promising - have you tried? I still feel that you would be better placed using something other than MouseClick which is dependent on screen resolution, location of the window and other things. What are these controls you are trying to click - looking at the coordinates, could they be menu items? Please help us to help you by giving us some more information. 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
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