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 

WinGet, Transparent problem

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
antonyb



Joined: 26 May 2004
Posts: 61

PostPosted: Tue Oct 11, 2005 11:51 am    Post subject: WinGet, Transparent problem Reply with quote

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.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Oct 11, 2005 10:41 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
antonyb



Joined: 26 May 2004
Posts: 61

PostPosted: Wed Oct 12, 2005 9:36 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports 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