JimmyN Posted October 18, 2014 Share Posted October 18, 2014 I'm converting some AHK scripts over. How would I handle this: MButton:: Send ^!c return Thanks...Jimbo Link to comment Share on other sites More sharing options...
water Posted October 18, 2014 Share Posted October 18, 2014 Welcome to AutoIt and the forum! I assume this could be translated to AutoIt like this: Func MButton() Send("^!c") ; Send Ctrl-ALT-c Return EndFunc My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted October 18, 2014 Developers Share Posted October 18, 2014 Welcome Jimbo, so tell us you did try first to have a look yourself before posting this rather simple question? Jos 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. Link to comment Share on other sites More sharing options...
Solution Malkey Posted October 19, 2014 Solution Share Posted October 19, 2014 I am totally guessing when the AHK script is run, when the middle mouse button is pressed Ctrl-ALT-c keys are send to the active window. On this basis, this example is a modified copy of the example in the help file under the _IsPressed() function. Note: When the Esc key is pressed, the script exits. #include <Misc.au3> #include <MsgBoxConstants.au3> Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("4", $hDLL) Then ; Middle mouse button ; Wait until key is released. While _IsPressed("10", $hDLL) Sleep(250) WEnd Send("^!c") ; Send Ctrl-ALT-c ElseIf _IsPressed("1B", $hDLL) Then ; Esc key MsgBox($MB_SYSTEMMODAL, "_IsPressed", "The Esc Key was pressed, therefore the application will close in 4 seconds.", 4) ExitLoop EndIf Sleep(250) WEnd DllClose($hDLL) Link to comment Share on other sites More sharing options...
JimmyN Posted October 19, 2014 Author Share Posted October 19, 2014 Jos, I did do some digging before I posted. In general I don't ask, I it figure out. I guess I should have asked where in the docs/wiki/help would be clues on how to do this. I checked all of them, looking for a "re-mapping" kind of thing. Jimbo... Link to comment Share on other sites More sharing options...
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