 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
antonyb
Joined: 26 May 2004 Posts: 61
|
Posted: Tue Oct 11, 2005 11:51 am Post subject: WinGet, Transparent problem |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Oct 11, 2005 10:41 pm Post subject: |
|
|
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 |
|
 |
antonyb
Joined: 26 May 2004 Posts: 61
|
Posted: Wed Oct 12, 2005 9:36 am Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|