232showtime Posted July 17, 2014 Posted July 17, 2014 how to set mouse button as a hotkey not _ispressed. Is it possible? Ive been searching the help file and still cant find it. I want to make a script to close an active window, something like this: #include <MsgBoxConstants.au3> HotKeySet("{Right}", "Close") ;Mouse event right click Func Close() Send("!{F4}") ;Close active window EndFunc ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon.
computergroove Posted July 19, 2014 Posted July 19, 2014 If you want to close an active window then try winclose - https://www.autoitscript.com/autoit3/docs/functions/WinClose.htm I am sure that I am not fully understanding what you are asking for. Can you give an example? Is the active window in another program or is it a regular windows program window? Obviously F4 closes a window (or you are pressing ALT and F4). Please clarify. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
232showtime Posted July 19, 2014 Author Posted July 19, 2014 (edited) If you want to close an active window then try winclose - https://www.autoitscript.com/autoit3/docs/functions/WinClose.htm I am sure that I am not fully understanding what you are asking for. Can you give an example? Is the active window in another program or is it a regular windows program window? Obviously F4 closes a window (or you are pressing ALT and F4). Please clarify. I want to close an active window using mouse button like a hotkey. I dont like to use _isPressed function... HotKeySet("{Right}", "Close") ;Mouse event right click, close active window while ;some script wend Func Close() Send("!{F4}") ;Close active window EndFunc ;==>Close ;or llike this HotKeySet("{Middle}", "Close") ;Middle mouse button click, close active window while ;some script wend Func Close() WinClose("[CLASS:CabinetWClass]") ;Close active window, its only basic window in windows OS CabinetWClass like if you open my computer window will popup EndFunc ;==>Close Edited July 19, 2014 by 232showtime ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon.
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