AutoHotkey Community

It is currently May 27th, 2012, 4:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: October 11th, 2005, 11:51 am 
Offline

Joined: May 26th, 2004, 12:20 pm
Posts: 61
Hello,

Can anyone else confirm that the following script doesn't behave as you'd expect?

Code:
Run, notepad.exe
sleep 2000
WinGet, id, ID, Untitled - Notepad
FileAppend, hwnd: %id%`n, *
WinGet, t1, Transparent, ahk_id %id%
FileAppend, Initial transparency: %t1%`n, *
FileAppend, Setting transparency to 100...`n, *
WinSet, Transparent, 100, ahk_id %id%
WinGet, t2, Transparent, ahk_id %id%
FileAppend, Current Transparency: %t2%`n, *
FileAppend, Minimizing...`n, *
WinMinimize, ahk_id %id%
sleep 2000
WinGet, t3, Transparent, ahk_id %id%
FileAppend, Transparency while minimized: %t3%`n, *
FileAppend, Restoring...`n, *
WinRestore, ahk_id %id%
WinGet, t4, Transparent, ahk_id %id%
FileAppend, Current Transparency: %t4%`n, *


n.b. it writes out to the console, so run it from a dos box.

Ant.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2005, 10:41 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the report. It appears that "WinGet Transparent" fails due to the call to OS function GetLayeredWindowAttributes() indicating a failure.

GetLayeredWindowAttributes() indicates that one of its incoming parameters is incorrect. But since I've verified that all the parameters passed to it are valid, this is either an OS bug or a failure condition that is undocumented at MSDN.

I will document it in the help file as a known limitation.

Thanks for reporting it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2005, 9:36 am 
Offline

Joined: May 26th, 2004, 12:20 pm
Posts: 61
Ok, thanks Chris.

Looks like the problem arises whenever a window is resized - I can reproduce it with WinMove too.

Ant.

Edit:

Incidently, googling found me this. However I've tried toggling WS_EX_LAYERED on and off:

Code:
WinGet, xs, ExStyle, ahk_id %id%

if (xs & 0x00080000) ; 0x00080000 is WS_EX_LAYERED
{
  WinSet, ExStyle, -0x00080000, ahk_id %id%
  WinSet, ExStyle, +0x00080000, ahk_id %id%
}


but this just seems to make the window disappear completely!


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 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