Sign in to follow this  
Followers 0
Paulie

Affect All Not Active Windows

6 posts in this topic

I need a way to handle all active or non-active windows diffeerntly, but there is no defined title for the windw.

what I want is to be able to make all windows that arent active currently transparent, and (if possible) able to click through and then when a window becomes active, make it not transparent anymore

any help appreiciated

TY

Share this post


Link to post
Share on other sites



So what's your plan? Is there something we can help you with? Or, should we submit scripts until you approve one... How about you set all windows transparent that are visible... add them to an array as you set them... then set the active one to non-transparent. As windows become active check them against your array and add them to the array if they are not, and set the window to transparent when it loses focus... I don't know, I am giving info that is more specific than your question, however.

Lar.

i just don't know how to get a handle on windows that arent active, thats what i need

Sorry for my poor wording :">

I just need a function or way of approaching this

Your way might work, but how do you get handles on all windows if you don't know their titles?

thanks

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I wrote something like this I think in Valuaters AutoIt wrappers.

Edit:

Just looked at it: http://www.autoitscript.com/forum/index.ph...pic=19370&st=15

Doesn't seem to be exactly what you want, but could easily be modded to work.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Dang, you guys are quick. Right after reading Larry's first post I came up with this:

$Windows = WinList()

For $Window = 1 to $Windows[0][0]

If NOT WinActive($Windows[$Window][0]) Then

WinSetTrans($Windows[$Window][0],"",155)

EndIf

Next

That sets all non-active windows transperency levels to 155


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

$list = WinList()

For $Window = 1 to $list[0][0]
    While 1
        If NOT WinActive($Windows[$list][0]) Then
        WinSetTrans($Windows[$list][0],"",155)
    EndIf
        Wend
Next

I tried this, I needed to change the WinList variable because it got overwritten in the other part of the script, but the proble is it for some reason affected my desktop transparency, i didn't know that was a window

how can you exclude that so you can still run things, and how do you make them not transparent when active

heres my attempt

For $Window = 1 to $list[0][0]
WinSetTrans($list[$window][0])
Next

But this just made my desktop cover everything so i couldn't open the star menu or right click or anything, I had to restart

Share this post


Link to post
Share on other sites

You could play around with something like this and see if you can get it to work how you want... take a look at the function carefully.

HotKeySet("{ESC}", "_QuitWinTrans")
HotKeySet('{F11}', '_StartWinTrans')

Global $AllWinsTransed, $StartWinTrans

While 1
    Sleep(10)
WEnd

Func _SetWinInvisible($s_WinVisible, $i_Trans)
    Local $HidOpt = Opt('WinDetectHiddenText', 1)
    Local $a_WinList = WinList()
    For $iCount = 1 To $a_WinList[0][0]
        If $a_WinList[$iCount][0] <> '' And $a_WinList[$iCount][0] <> $s_WinVisible _
            And BitAND($a_WinList[$iCount][1], 2) = 2 And $a_WinList[$iCount][0] <> 'Program Manager' Then
            $AllWinsTransed &= $a_WinList[$iCount][0] & Chr(01)
            WinSetState($a_WinList[$iCount][0], '', $i_Trans)
        EndIf
    Next
    $AllWinsTransed = StringSplit(StringTrimRight($AllWinsTransed, 1), Chr(01))
EndFunc

Func _StartWinTrans()
    $StartWinTrans = Not $StartWinTrans
    While $StartWinTrans
        _SetWinInvisible(WinGetTitle(''), 0)
        Sleep(100)
        ToolTip('WinTrans active', 0, 0)
    WEnd
    ToolTip('')
EndFunc

Func _QuitWinTrans()
    If IsArray($AllWinsTransed) Then
        For $iCount = 1 To UBound($AllWinsTransed) - 1
            WinSetState($AllWinsTransed[$iCount], '', 255)
        Next
    EndIf
    If $StartWinTrans Then $StartWinTrans = Not $StartWinTrans
EndFunc


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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  
Followers 0