SerHenning Posted August 21, 2019 Posted August 21, 2019 (edited) Hey, is it possible to put a command such as MouseClick to a variable something like this: Local $vLala $vLala = MouseClick ( "left", 1000, 400, 1) so I can just put $vLala in whenever I want AutoIt to click on that position? EDIT: I know that you can do it by making two variables for 1000 and 400, but I want to do it smaller ^^ Edited August 21, 2019 by SerHenning
Earthshine Posted August 21, 2019 Posted August 21, 2019 try this Execute($vLala) My resources are limited. You must ask the right questions
SerHenning Posted August 21, 2019 Author Posted August 21, 2019 Just put it in, nothing is happening, but I'm not getting any errors either 😕
Nine Posted August 21, 2019 Posted August 21, 2019 $vLala = 'MouseClick ( "left", 1000, 400, 1)' Execute ($vLaLa) it must be a string (needs to be embedded into ' or "). “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
SerHenning Posted August 21, 2019 Author Posted August 21, 2019 Works perfectly now, thank you guys! ❤️
Developers Jos Posted August 21, 2019 Developers Posted August 21, 2019 I am seriously wondering what one would gain from doing this? Jos dascondor and Earthshine 1 1 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.
Juvigy Posted August 22, 2019 Posted August 22, 2019 Personal satisfaction and harder to read script. Earthshine and dascondor 2
Earthshine Posted August 22, 2019 Posted August 22, 2019 (edited) much harder to maintain script. basically it makes zero sense to do this in most cases. Edited August 22, 2019 by Earthshine My resources are limited. You must ask the right questions
Moderators Melba23 Posted August 22, 2019 Moderators Posted August 22, 2019 SerHenning, Why not just use a function: _Lala() Func _Lala() MouseClick ( "left", 1000, 400, 1) EndFunc 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