JoewAlabel Posted November 1, 2019 Posted November 1, 2019 Good! I'm making one script to press one key (PAUSE) and it stays pressing and releasing mouse left click. But i want to press F1 and a tooltip shows up: "Please select the Key". And after that, instead PAUSE sends left mouse clicks, it send the key the user pressed on keyboard. Better if it detects multiples key too. I've: expandcollapse popup#include<IE.au3> #include <Misc.au3> HotKeySet("{ESC}" , "close") HotKeySet("{PAUSE}" , "startpause") HotKeySet("{F1}" , "mapkey") Dim $click = False Dim $keymapped = Null Dim $mousekey = True $dll = DllOpen("user32.dll") Func close() Exit EndFunc Func startpause() $click = Not $click EndFunc Func mapkey() $keymapped = GET HERE KEY THAT USER PRESSED! EndFunc While 1 If $click = True Then If $mousekey = True Then MouseClick("left") EndIf If $mousekey = False And $keymapped Not Null Then Send($keymapped) EndIf Sleep(50) EndIf sleep(20) WEnd Could anyone help me creating this, please? Thank you!
Moderators Melba23 Posted November 1, 2019 Moderators Posted November 1, 2019 JoewAlabel, Welcome to the AutoIt forums. Before going any further I suggest you read this announcement - detecting any key pressed is a bit of a no-no around here. 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: Reveal hidden contents 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
JoewAlabel Posted November 1, 2019 Author Posted November 1, 2019 On 11/1/2019 at 9:09 PM, Melba23 said: JoewAlabel, Welcome to the AutoIt forums. Before going any further I suggest you read this announcement - detecting any key pressed is a bit of a no-no around here. M23 Expand Thank you! I read, but as I posted, i need just to map the key to send it infinite till users press PAUSE key. Its a better Autoclicker, but instead of just left mouse button clicks i want the user set the key they want after pressed "F1".
Nine Posted November 1, 2019 Posted November 1, 2019 On 11/1/2019 at 9:19 PM, JoewAlabel said: i need just to map the key to send it infinite till users press PAUSE key Expand That looks like you are trying to automate a game Please read forum rules. “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents 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
Moderators JLogan3o13 Posted November 1, 2019 Moderators Posted November 1, 2019 @JoewAlabel you have been pointed to the forum rules twice now. Why don't you explain just what you're trying to accomplish. ===In case you missed it, this is a Mod stepping into a thread=== "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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