Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

make a window transparent and click through it


  • Please log in to reply
10 replies to this topic
sam.reckoner
  • Members
  • 51 posts
  • Last active: Apr 06 2012 02:20 AM
  • Joined: 11 Oct 2007
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.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
WinSet, ExStyle, +0x00000020, ahk_id %hwnd%


sam.reckoner
  • Members
  • 51 posts
  • Last active: Apr 06 2012 02:20 AM
  • Joined: 11 Oct 2007
Thanks for your response. But, this doesn't do the click-through part.

WinSet, ExStyle, +0x00000020, ahk_id %hwnd%



argneo
  • Members
  • 220 posts
  • Last active: Mar 20 2015 09:18 PM
  • Joined: 14 Sep 2007
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...
Posted Image Search&Replace

Don't use cannon to kill mosquito

sam.reckoner
  • Members
  • 51 posts
  • Last active: Apr 06 2012 02:20 AM
  • Joined: 11 Oct 2007
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 ]

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

Thanks for your response. But, this doesn't do the click-through part.

WinSet, ExStyle, +0x00000020, ahk_id %hwnd%


Well....it does...so maybe test it properly in future :roll:

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


Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007

Thanks for your response. But, this doesn't do the click-through part.

WinSet, ExStyle, +0x00000020, ahk_id %hwnd%

That's right. You have to combine it with WinSet Transparent
; WinSet, Transparent, Off, ahk_id %hWnd%
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
WinSet, Transparent, 128, ahk_id %hWnd%


GodlyMario
  • Members
  • 62 posts
  • Last active: Apr 24 2011 12:38 PM
  • Joined: 02 Jul 2008
can the same done to be normal windows like explorers instead of GUI?

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
A window is a window. A window is also a GUI. Therefore, yes.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

can the same done to be normal windows like explorers instead of GUI?


Alright lazy pants...why not try it yourself? :wink:

#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


sam.reckoner
  • Members
  • 51 posts
  • Last active: Apr 06 2012 02:20 AM
  • Joined: 11 Oct 2007
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!