Jump to content
satanttin

[Solved] WinSetTrans question

Recommended Posts

satanttin

Hello all,

 

I'm a little playing with WinSetTrans and i have a little question. If i want to make chrome transparent i can use the handle which is diffrent everytime you reopen chrome so that's not great. so i tried using the title but that only works when that tab is open...

 

so is there a way to make sure u can make it transparent no matter what?

Edited by satanttin

Share this post


Link to post
Share on other sites
satanttin

@L3ill it's a good alternative tho ^^ so thanks might aswell make this first:P

rather wish i could put all the handles in a dropdownmenu and select one and make them transparent:P

Share this post


Link to post
Share on other sites
satanttin

Oh found it all i need was to put "Opt("WinTitleMatchMode", 2)" in my script :') and then i can use something like WinSetTrans("Google Chrome", "", 210) :D

 

The full code if someone wants it:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>

Global $Handle, $Value, $aHandle, $aValue

Opt("WinTitleMatchMode", 2)
Opt("GUIOnEventMode", 1)

Main()
Func Main()
$Main = GUICreate("Transparent Test", 420, 420, 100, 200)
$Handle = GUICtrlCreateInput("Enter program...", 50, 25)
$Value = GUICtrlCreateInput("Enter Value. 0/255", 50, 50)
$Send = GUICtrlCreateButton("Make Transparent", 50, 75)
GUICtrlSetOnEvent($Send, "Submit")

GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "stop")
EndFunc

Func Submit()
$aHandle = GUICtrlRead($Handle)
$aValue = GUICtrlRead($Value)
WinSetTrans($aHandle, "", $aValue)
EndFunc

Func stop()
    Exit
EndFunc

While 1
    Sleep(50)
WEnd

 

Edited by satanttin

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

×