AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to receive all Windows Close and Open actions

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
bob3150



Joined: 03 May 2005
Posts: 44

PostPosted: Tue Mar 28, 2006 2:15 am    Post subject: Is it possible to receive all Windows Close and Open actions Reply with quote

Is it somehow possible to receive all Window Close and Open actions from Windows to trigger an script action. - Another explanation: It does not matter which window appears or disappears on Desktop in each case should be triggered an action. Hopefully it is understandable what want to do. Smile
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Tue Mar 28, 2006 6:24 am    Post subject: Reply with quote

Quote:
WinGet
--------------------------------------------------------------------------------
Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria.

WinGet, OutputVar [, Cmd, WinTitle, WinText, ExcludeTitle, ExcludeText]

List: Retrieves the unique ID numbers of all existing windows that match the specified WinTitle, WinText, ExcludeTitle, and ExcludeText (to retrieve all windows on the entire system, leave WinTitle and WinText blank but specify Program Manager or a nonexistent title for ExcludeTitle [this is no longer necessary in v1.0.30.02+]). Each ID number is stored in an array element whose name begins with OutputVar's own name, while OutputVar itself is set to the number of retrieved items (0 if none). For example, if OutputVar is MyArray and two matching windows are discovered, MyArray1 will be set to the ID of the first window, MyArray2 will be set to the ID of the second window, and MyArray itself will be set to the number 2. Windows are retrieved in order from topmost to bottommost (according to how they are stacked on the desktop). Hidden windows are included only if DetectHiddenWindows has been turned on. Within a function, to create an array that is global instead of local, declare MyArray as a global variable prior to using this command.
Back to top
bob3150



Joined: 03 May 2005
Posts: 44

PostPosted: Tue Mar 28, 2006 7:55 am    Post subject: Reply with quote

I'm not sure how this should work. I guess you mean I should use a timer should continuously check the existing or non existing windows. If it is like this - it probably could help for upcoming windows, but not for disappearing windows, because I have to know that the windows is closing before it disappears.
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Tue Mar 28, 2006 8:48 am    Post subject: Reply with quote

I guess you've to know that the window exists before you're able to track down if it's active (open/on focus) ...
Back to top
Guest






PostPosted: Tue Mar 28, 2006 9:35 am    Post subject: Reply with quote

Sorry my English is not so good and I don't understand what you exactly mean. Should that mean that it is not possible to get the system events for closing and opening a window at all?
Probably for better understanding what I want to do is I want to fade in and out windows when they appear or disappear.
Back to top
Thalon



Joined: 12 Jul 2005
Posts: 633

PostPosted: Tue Mar 28, 2006 10:07 am    Post subject: Reply with quote

Not possible seems not correct for my understanding.
Let's say:
It can not be fully done with AHK afaik.

It should be possible to recognize the close-event with a dll, which is forced to be loaded to each application that exists. This dll would have to be generated with another language first.

But maybe you could explain us what script you have in mind Wink
Sometimes there are other solutions possible Smile

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
Back to top
View user's profile Send private message
bob3150



Joined: 03 May 2005
Posts: 44

PostPosted: Tue Mar 28, 2006 12:16 pm    Post subject: Reply with quote

Poo, that seems to get to complicated!
I thought I explained it above what it should do - there is also an app which dose nearly what I want (ZoomOpen), but its buggy, fading can not be adapted and it costs a lot of money for that quality. Or is there another app with can do that except WindowFx which is also really buggy?
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1237

PostPosted: Tue Mar 28, 2006 12:41 pm    Post subject: Reply with quote

Quote:
Is it somehow possible to receive all Window Close and Open actions from Windows to trigger an script action. - Another explanation: It does not matter which window appears or disappears on Desktop in each case should be triggered an action. Hopefully it is understandable what want to do.


It isn't necessarily that complicated, it depends exactly what you need to watch and what you need to do when you find a change.

I've been thinking about making a function to return a list of windows that appear on the Alt-Tab list (that I have in my Alt-Tab replacement script) - I already posted a script that returned the windows on the taskbar. Depending on your precise needs, this may be enough (or could be adapted) to return a list of windows and you could use a timer to check against the last found items (like BoBo was hinting at above, but the window list also contains windows you probably don't want to consider).
Back to top
View user's profile Send private message
Greg



Joined: 22 Dec 2005
Posts: 245

PostPosted: Tue Mar 28, 2006 12:49 pm    Post subject: Reply with quote

To those who don't understand, bob3150 wants a script that automatically makes windows fade in and fade out when opened or closed.

Thalon wrote:
It can not be fully done with AHK...
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1237

PostPosted: Tue Mar 28, 2006 1:08 pm    Post subject: Reply with quote

Ahh I see. The answer would be no, you can't do it without using window hooks, which AHK doesn't support (tho I'd really like them some day Wink )... and even then it'd probably be complicated. There's probably a good reason those other programs that do it are buggy Laughing
Back to top
View user's profile Send private message
bob3150



Joined: 03 May 2005
Posts: 44

PostPosted: Tue Mar 28, 2006 1:09 pm    Post subject: Reply with quote

Thank you Greg that you bring it on the point. I was afraid of such an answer that it couldn't be done with AHK Crying or Very sad
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Tue Mar 28, 2006 1:50 pm    Post subject: Reply with quote

@bob3150
sprichst du Deutsch ?
Back to top
bob3150



Joined: 03 May 2005
Posts: 44

PostPosted: Tue Mar 28, 2006 2:15 pm    Post subject: Reply with quote

Ja!
Back to top
View user's profile Send private message
Thalon



Joined: 12 Jul 2005
Posts: 633

PostPosted: Tue Mar 28, 2006 2:55 pm    Post subject: Reply with quote

Kannst ja bei uns auch mal reinschauen!
Einfach auf das nette Bildchen klicken in meiner Signatur Wink

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group