| View previous topic :: View next topic |
| Author |
Message |
sam.reckoner
Joined: 11 Oct 2007 Posts: 10
|
Posted: Sat Jun 28, 2008 4:10 pm Post subject: make a window transparent and click through it |
|
|
Is it possible to make a window transparent and then be able to click through the same window to the underlying matter?
I would like to create a status window that is mostly transparent, but that I can click through.
Thanks in advance. |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1354
|
Posted: Sat Jun 28, 2008 4:22 pm Post subject: |
|
|
| Code: | | WinSet, ExStyle, +0x00000020, ahk_id %hwnd% |
|
|
| Back to top |
|
 |
sam.reckoner
Joined: 11 Oct 2007 Posts: 10
|
Posted: Tue Jul 08, 2008 2:58 pm Post subject: |
|
|
Thanks for your response. But, this doesn't do the click-through part.
| tic wrote: | | Code: | | WinSet, ExStyle, +0x00000020, ahk_id %hwnd% |
|
|
|
| Back to top |
|
 |
argneo
Joined: 14 Sep 2007 Posts: 124
|
Posted: Tue Jul 08, 2008 3:03 pm Post subject: |
|
|
Is the window in the back regularly the same?
because you could send clicks to the window directly by getting the ID... Almost like you would do in games... _________________
WoW |
|
| Back to top |
|
 |
sam.reckoner
Joined: 11 Oct 2007 Posts: 10
|
Posted: Tue Jul 08, 2008 3:20 pm Post subject: |
|
|
Thanks for your response.
The window I am trying to get this working with scrolls lines of text (error/status messages) approximately twice every second. It's a status window that I would like to keep track of. Making it transparent is very useful, except that I cannot click any of the icons under it. I would like to be able to use the transparency but also to click at the underlying icons. I would like to regain control of this window (i.e. click into it) by using the taskbar, or the window's title bar.
[ Moderator!: Don't top-post ] |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1354
|
Posted: Tue Jul 08, 2008 4:29 pm Post subject: |
|
|
| sam.reckoner wrote: | Thanks for your response. But, this doesn't do the click-through part.
| tic wrote: | | Code: | | WinSet, ExStyle, +0x00000020, ahk_id %hwnd% |
|
|
Well....it does...so maybe test it properly in future
| Code: | DetectHiddenWindows, on
Gui, 1: +LastFound +AlwaysOnTOp
hwnd1 := WinExist()
WinSet, ExStyle, +0x00000020, ahk_id %hwnd1%
WinSet, Transparent, 100, ahk_id %hwnd1%
Gui, 1: Show, w500 h500
Return |
|
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1338
|
Posted: Tue Jul 08, 2008 4:54 pm Post subject: |
|
|
| sam.reckoner wrote: | Thanks for your response. But, this doesn't do the click-through part. | tic wrote: | | Code: | | WinSet, ExStyle, +0x00000020, ahk_id %hwnd% |
|
|
That's right. You have to combine it with WinSet Transparent
| Code: | ; WinSet, Transparent, Off, ahk_id %hWnd%
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
WinSet, Transparent, 128, ahk_id %hWnd%
|
|
|
| Back to top |
|
 |
GodlyMario
Joined: 02 Jul 2008 Posts: 35
|
Posted: Tue Jul 08, 2008 5:21 pm Post subject: |
|
|
| can the same done to be normal windows like explorers instead of GUI? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Tue Jul 08, 2008 5:39 pm Post subject: |
|
|
A window is a window. A window is also a GUI. Therefore, yes. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1354
|
Posted: Tue Jul 08, 2008 5:42 pm Post subject: |
|
|
| GodlyMario wrote: | | can the same done to be normal windows like explorers instead of GUI? |
Alright lazy pants...why not try it yourself?
| Code: | #SingleInstance, Force
DetectHiddenWindows, on
Hotkey, ~^LButton, ClickThrough, On
Return
ClickThrough:
MouseGetPos, x, y, hwnd
WinSet, AlwaysOnTop, On, ahk_id %hwnd%
WinSet, Transparent, 100, ahk_id %hwnd%
WinSet, ExStyle, +0x00000020, ahk_id %hwnd%
Return |
|
|
| Back to top |
|
 |
sam.reckoner
Joined: 11 Oct 2007 Posts: 10
|
Posted: Tue Jul 08, 2008 7:03 pm Post subject: |
|
|
This works great! Beware that if you accidentally do the Ctrl+LButton on the desktop, it will make the entire desktop transparent/click-through, which may require a re-login.
Thanks again for all the great help! |
|
| Back to top |
|
 |
|