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!
close hovered-over [child] window
Re: close hovered-over [child] window
Are you using MouseGetPos ??
Re: close hovered-over [child] window
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
MouseGetPos, , , windowID
WinClose, ahk_id %windowID%
return
Re: close hovered-over [child] window
WindowId are unique, maybe its a control that looks like a window ?
What is the app ?
What is the app ?
Re: close hovered-over [child] window
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.
Re: close hovered-over [child] window
Well, I just wasted my time downloading the trial ... I need a usb licenserbeeski wrote:it's a music production app (nuendo)
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)beeski wrote: if it were a control, how would the command to 'close' it look like
Use MouseGetPos, ,, windowID, controlID, 2 to get the unique control id
Re: close hovered-over [child] window
4GForce wrote:Well, I just wasted my time downloading the trial ... I need a usb licenserbeeski wrote:it's a music production app (nuendo)
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)beeski wrote: if it were a control, how would the command to 'close' it look like
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.
Re: close hovered-over [child] window
Bah, no biggy ...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.
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 !?!?