Jump to content
Sign in to follow this  
madflame991

Clicking behind a window... How?

Recommended Posts

madflame991

Simple question: how can I click behind a semitransparent layered window?

Thx!

Edit: I suppose it has to be ontop

#include <ScreenCapture.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
Run('mspaint.exe')
Sleep(1000); to waituntil paint is opened
_ScreenCapture_Capture('pic.jpg',0,0,@DesktopWidth,@DesktopHeight)
$win = GUICreate('',100,100,100,100,BitOR($WS_MAXIMIZE,$WS_POPUP),BitOr($WS_EX_LAYERED,$WS_EX_TOOLWINDOW))
$pic = GUICtrlCreatePic('pic.jpg',1,1,0,0)
WinSetTrans($win,'',64)
GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
GUIDelete($win)
FileDelete('pic.jpg')

I want to be able to draw in mspain or anything else with a semitransparent on top model image...

EDIT2: See last post for solutin

Edited by madflame991

Share this post


Link to post
Share on other sites
madflame991
BrettF

And we keep telling everyone to search because stuff has been answered 100 million times before... Posts like yours. Most of us are tired of telling everyone who comes here how to do something. Seriously its not hard! If you have a search, can't find anything then you can have a go. and if that still doesn't work, you post both your code, and your question here.

But obviously it is to hard for everyone, so we must keep doing the hard work.

Boo hoo.

Brett

Share this post


Link to post
Share on other sites
madflame991

If you don't want to answer then don't do anything else, it's useless anyway to tell to "google it" or "use search"... I do that automatically to prevent this kind of posts... really, I do, and I even searched again when manadar asked.

If however there is no one here that can give me a link to the thousands of examples on this topic or just a useful hint ("google it" is NOT useful) then please please any moderator, delete this post as it is useless.

Share this post


Link to post
Share on other sites
BrettF
madflame991

I wanna make a semitransparent layered on top window that will basically be an image. This is useful for anyone to draw in paint & co from a reference picture. I just want the gui to ignore the mouse clicks, or pass them behind it.

thx

Share this post


Link to post
Share on other sites
TerarinK

The thing your trying to do is mirror, is this for a game with gameguard? GuiCtrlDummy_Create would be the command to use and you can focus it around the application. Just making the whole application transparent in itself, but have it on top of the GUI that you would like that way you can send your clicks through the appication and onto your application.

However search for "transparent layered" and "gui ignore" in here as it will lead you in the right direction


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites
TerarinK

Just to note the hostility around here is bad please don't say search and not give a clue to what to search. I mean I can search for a topic that I want to and have done but behold it isn't just what I've been looking for. Now it isn't about the topic but it is under a different name, when I found it. Now can you see where I am without searching for a keyword saying search would mean nothing to me.

To bad there isn't a forum mod who can close the topic down with the right topic, I mean that would be the best thing.


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites
madflame991

ok... I added some sourcecode in the first post, it kinda reflects what I'm trying to achieve. Where should I use GUICtrlCreateDummy? (I feel noobish)

oh... I'm not using this because of a game, I just can't draw using the mouse and I figured there are many like me, and why not create a script for the incapacitated...

Edited by madflame991

Share this post


Link to post
Share on other sites
Malkey

Simple question: how can I click behind a semitransparent layered window?

Thx!

Edit: I suppose it has to be ontop

#include <ScreenCapture.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
Run('mspaint.exe')
Sleep(1000); to waituntil paint is opened
_ScreenCapture_Capture('pic.jpg',0,0,@DesktopWidth,@DesktopHeight)
$win = GUICreate('',100,100,100,100,BitOR($WS_MAXIMIZE,$WS_POPUP),BitOr($WS_EX_LAYERED,$WS_EX_TOOLWINDOW))
$pic = GUICtrlCreatePic('pic.jpg',1,1,0,0)
WinSetTrans($win,'',64)
GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
GUIDelete($win)
FileDelete('pic.jpg')

I want to be able to draw in mspain or anything else with a semitransparent on top model image...

Try this.

#include <ScreenCapture.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>

HotKeySet("{ESC}", "Terminate")

Run('mspaint.exe')
Sleep(1000); to waituntil paint is opened
_ScreenCapture_Capture('pic.jpg', 0, 0, @DesktopWidth, @DesktopHeight)

$win = GUICreate('', 400, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_TRANSPARENT, $WS_EX_TOPMOST))
$pic = GUICtrlCreatePic('pic.jpg', 1, 1, 0, 0)
WinSetTrans($win, '', 100)
GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
GUIDelete($win)
FileDelete('pic.jpg')

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×