AutoHotkey Community

It is currently May 27th, 2012, 7:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: March 28th, 2006, 3:15 am 
Offline

Joined: May 3rd, 2005, 1:05 pm
Posts: 44
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. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 7:24 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 8:55 am 
Offline

Joined: May 3rd, 2005, 1:05 pm
Posts: 44
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 9:48 am 
I guess you've to know that the window exists before you're able to track down if it's active (open/on focus) ...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 10:35 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 11:07 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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 ;)
Sometimes there are other solutions possible :)

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 1:16 pm 
Offline

Joined: May 3rd, 2005, 1:05 pm
Posts: 44
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 1:41 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 1:49 pm 
Offline

Joined: December 22nd, 2005, 7:43 pm
Posts: 245
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 2:08 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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 :lol:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 2:09 pm 
Offline

Joined: May 3rd, 2005, 1:05 pm
Posts: 44
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 :cry:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 2:50 pm 
@bob3150
sprichst du Deutsch ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 3:15 pm 
Offline

Joined: May 3rd, 2005, 1:05 pm
Posts: 44
Ja!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2006, 3:55 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
Kannst ja bei uns auch mal reinschauen!
Einfach auf das nette Bildchen klicken in meiner Signatur ;)

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], sjc1000 and 71 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group