How To Prevent Interaction With GUI Image?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mulsiphix
Posts: 148
Joined: 20 Nov 2015, 17:56

How To Prevent Interaction With GUI Image?

Post by Mulsiphix » 20 Jan 2022, 18:25

I use a GUI to show images that appear and disappear (helps me realize when my mic is toggled on). One of these images is dead center and overlaps with the firing crosshair in the game. Sometimes when I am left clicking with my mouse to fire, the image will appear at the same time of the mouse click. When this happens, the left-click is not registered in game and Windows plays a sound.

It seems obvious my mouse is clicking on the GUI image. Is it possible to display the image without my mouse being able to interact with it? I have tried messing with AlwaysOnTop and Disabled, but neither affect the problem.

Code: Select all

Gui, -Caption +AlwaysOnTop +Disabled +ToolWindow +LastFound


Mulsiphix
Posts: 148
Joined: 20 Nov 2015, 17:56

Re: How To Prevent Interaction With GUI Image?

Post by Mulsiphix » 20 Jan 2022, 19:36

Code: Select all

Gui, % CLICKTHROUGH := "+E0x20"
This line fixed the problem for me. I added it to what I had and it works flawlessly now. Thank you so much! :dance:

teadrinker
Posts: 4326
Joined: 29 Mar 2015, 09:41
Contact:

Re: How To Prevent Interaction With GUI Image?

Post by teadrinker » 20 Jan 2022, 20:10

0x20 is not CLICKTHROUGH. :lol:

User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: How To Prevent Interaction With GUI Image?

Post by mikeyww » 20 Jan 2022, 21:09

Maybe it's WS_EX_TRANSPARENT, but I think it's just a name I gave it for convenience!

teadrinker
Posts: 4326
Joined: 29 Mar 2015, 09:41
Contact:

Re: How To Prevent Interaction With GUI Image?

Post by teadrinker » 21 Jan 2022, 05:55

If you use WS_EX_TRANSPARENT, the curious user could google it, go here and find related info. If you use CLICKTHROUGH, it's a just a magic number.

User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: How To Prevent Interaction With GUI Image?

Post by mikeyww » 21 Jan 2022, 06:14

You're right. I stand corrected. Thank you, teadrinker. I sometimes just write for my own convenience, and I didn't really think that far ahead on this one.

Post Reply

Return to “Ask for Help (v1)”