AutoHotkey Community

It is currently May 25th, 2012, 1:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: April 18th, 2007, 4:25 pm 
Offline

Joined: January 13th, 2006, 3:13 pm
Posts: 29
Hey yinz guys,

in my latest script, i was attempting to catch some window properties from a windows explorer window that gets mapped and then unmapped. Occasionally the window stays open even after unmapping.

anyway if I forget to close the window myself, I was trying to use those window properties (from WinGet?) to have the script close it.

However I am noticing that I can't seem to gather the correct properties to pertain to just that one window, and it seems to affect ANY window; if there isn't an open (or unminimized) window the WinClose seems to bring up a logoff scenario, with XP, or it just closes any open window that happens to be up.

Here's what I've come up with so far:
Code:
WinWait,ahk_class CabinetWClass,
WinGet, WinPID, PID
and later
Code:
WinClose, ahk_pid %WinPID%,


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 18th, 2007, 10:45 pm 
Offline

Joined: February 11th, 2005, 6:31 am
Posts: 174
Location: Germany
Does this code produces the same result?
Code:
WinWaitActive,ahk_class CabinetWClass,
WinGet, WinPID, PID
...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 18th, 2007, 10:52 pm 
Offline

Joined: January 13th, 2006, 3:13 pm
Posts: 29
Andi wrote:
Does this code produces the same result?
Code:
WinWaitActive,ahk_class CabinetWClass,
WinGet, WinPID, PID
...
When I get back to the office tomorrow, I'll check it...
thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 2:05 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
You may have to tick in Folder Options -> View -> ... separate process ..., or something similar.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 2:41 pm 
Offline

Joined: January 13th, 2006, 3:13 pm
Posts: 29
Andi wrote:
WinWaitActive,ahk_class CabinetWClass,
WinGet, WinPID, PID
...


Sean wrote:
You may have to tick in Folder Options -> View -> ... separate process ..., or something similar.


It looks like I needed to have both of those changes made for it to work. Thanks guys!!! :P


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Bing [Bot], Rathgar2, Yahoo [Bot] and 13 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