Jump to content

Recommended Posts

Posted

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 graduated.gif

Correct answer, learn to walk before you take on that marathon.

Posted

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

Posted (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 by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...