close hovered-over [child] window

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

close hovered-over [child] window

16 Feb 2017, 07:54

hello all

i am trying to come up with a simple solution to close the topmost window the mouse cursor may be hovering over at a given point in time, whether that window be active / has keyboard focus or not.

i have found a way of making this work with most applications, but my target app keeps its window title & class constant; any child window it creates within itself seems to be able to be picked out by a different ClassNN. would you be able to suggest a way of closing the topmost child window created in this manner (ie. so that a WinClose command does not in fact close the parent window, thereby shutting down the entire application)?

thank you!
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
Contact:

Re: close hovered-over [child] window

16 Feb 2017, 15:15

Are you using MouseGetPos ??
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

Re: close hovered-over [child] window

16 Feb 2017, 15:26

below is a most basic version that however closes the whole parent application (even if the mouse is hovering over another window that the application had created). using windowspy i found out the windows instantiated within my application share the same windowID, and only differentiate in ClassNN. but i am not sure how to close such window using WinClose (or another ahk command for that matter):


MouseGetPos, , , windowID
WinClose, ahk_id %windowID%
return
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
Contact:

Re: close hovered-over [child] window

16 Feb 2017, 17:06

WindowId are unique, maybe its a control that looks like a window ?
What is the app ?
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

Re: close hovered-over [child] window

17 Feb 2017, 02:10

4GForce wrote:WindowId are unique, maybe its a control that looks like a window ?
What is the app ?

it's a music production app (nuendo); if it were a control, how would the command to 'close' it look like, would someone happen to know?

thank you.
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
Contact:

Re: close hovered-over [child] window

17 Feb 2017, 02:58

beeski wrote:it's a music production app (nuendo)
Well, I just wasted my time downloading the trial ... I need a usb licenser :(
beeski wrote: if it were a control, how would the command to 'close' it look like
I don't know, I would start trying with GuiControl, Move to see if you get any response from the control (https://autohotkey.com/docs/commands/Gu ... b-commands)
Use MouseGetPos, ,, windowID, controlID, 2 to get the unique control id
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

Re: close hovered-over [child] window

17 Feb 2017, 06:08

4GForce wrote:
beeski wrote:it's a music production app (nuendo)
Well, I just wasted my time downloading the trial ... I need a usb licenser :(
beeski wrote: if it were a control, how would the command to 'close' it look like
I don't know, I would start trying with GuiControl, Move to see if you get any response from the control (https://autohotkey.com/docs/commands/Gu ... b-commands)
Use MouseGetPos, ,, windowID, controlID, 2 to get the unique control id

i am sorry-- i'd never expect people to take the trouble and actually try downloading the software; that's quite humbling.

i will try your guicontrol / move suggestion.
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
Contact:

Re: close hovered-over [child] window

17 Feb 2017, 15:18

beeski wrote:i am sorry-- i'd never expect people to take the trouble and actually try downloading the software; that's quite humbling.

i will try your guicontrol / move suggestion.
Bah, no biggy ...
I was curious and a good music software is always nice to have.
It's not like I wasn't doing anything else while it was downloading =p
There seem to be a lot of shortcut keys you can set in that software, none doing what you want ?

That said, I have no clue and can't really help you.
Maybe if you repost with a title like 'how to close Nuendo hovered child window' you might find someone who would know !?!?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, mikeyww, supplementfacts and 230 guests