Jump to content

[Solved] WinSetTrans question


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...