beamtenversteher Posted February 8, 2022 Posted February 8, 2022 hi, i am really new to autoit - so currently i do not have that much knowledge but ive found an event which might helps me. I am searching for a event handler which sends a special key stroke of my keyboard if i send a double click (within a given time frame - 50ms) Example: left mouse button double click = Key "M" on keyboard. Could you advice me what is to do? r
Moderators Melba23 Posted February 8, 2022 Moderators Posted February 8, 2022 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team 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
beamtenversteher Posted February 8, 2022 Author Posted February 8, 2022 thx for moving. here my first attempt - but does not work: #include <GUIConstantsEx.au3> #include "MouseOnEvent.au3" HotKeySet("{ESC}", "_Quit") _MouseSetOnEvent($MOUSE_PRIMARYDBLCLK_EVENT, "PDC") Func MOUSE_PRIMARYDBLCLK_EVENT() ConsoleWrite("K") EndFunc
Nine Posted February 8, 2022 Posted February 8, 2022 Could you explain which application you are trying to automate this way ? “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
beamtenversteher Posted February 8, 2022 Author Posted February 8, 2022 hi, well - in a chrome based extension there are some shortcuts existing. Eg. with Keyboard key "M" something will be done. I would like to start this shortcut by doulbe click mouse and not by pressing "M" on the keyboard.
Nine Posted February 8, 2022 Posted February 8, 2022 Could you give me the name of the extension, so I can take a look at it. Thanks. “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
beamtenversteher Posted February 8, 2022 Author Posted February 8, 2022 it is not for free and u have to geister to use it. But why it is important? I want only to lead a mouse double click into a simple pressed keyboard key....
Solution ad777 Posted February 8, 2022 Solution Posted February 8, 2022 @beamtenversteher Send Win + R(Run) if Left Mouse Double Click: #include <GUIConstantsEx.au3> #include "..\MouseOnEvent.au3" HotKeySet("{ESC}", "_Quit") _BlockDBClick() Func _BlockDBClick() Local $hGUI = GUICreate("") GUISetState(@SW_HIDE, -1) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MouseDBEvent") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MouseDBEvent", $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>_BlockDBClick Func _MouseDBEvent() Send("#r") ;;send Win+r ;;;;do stuff Return $MOE_BLOCKDEFPROC ;Block EndFunc ;==>_MouseDBEvent Func _Quit() Exit EndFunc ;==>_Quit none
beamtenversteher Posted February 8, 2022 Author Posted February 8, 2022 awesome - thank u so much! do you think it is possible to set a max duration between both clicks of the double click? max 50ms...eg
beamtenversteher Posted February 8, 2022 Author Posted February 8, 2022 1000% solution if i can define the related area where i have to double click and the rest double click should not have any effect.
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