AutoHotkey Community

It is currently May 26th, 2012, 5:34 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: April 10th, 2008, 4:43 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Here's an example script that shows the active window's parent when you Press F1. Any ideas why it wouldn't find a parent for the Winamp v 2.81 playlist editor window when Windowse http://www.greatis.com/delphicb/windowse/ reports that there is one (as expected)?

Code:
F1::
DetectHiddenWindows, On
WinGet, wid, ID, A ; click in Winamp v2.81 playlist editor window first
Parent := Decimal_to_Hex( DllCall( "GetParent", "uint", wid ) )
msgbox, %Parent%
Return

Esc::exitapp

Decimal_to_Hex(var)
{
  SetFormat, integer, hex
  var += 0
  SetFormat, integer, d
  return var
}


Last edited by evl on April 13th, 2008, 10:42 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2008, 10:29 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Well I found the solution: The window doesn't have a parent, it has an owner.

Code:
Owner := Decimal_to_Hex( DllCall( "GetWindow", "uint", wid , "uint", "4" ) ) ; GW_OWNER = 4


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, mrhobbeys, patgenn123, poserpro, tank and 62 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