er453r Posted May 11, 2007 Posted May 11, 2007 (edited) And "Aero" theme only, since in Aero theme all windows are handled the same way, no matter the content (DirectX propably...) Ok, so the idea for the script was simple - I wanted to write my code watching a movie. So why not make my editor transparent? So here it is. And it can even make transparent any visible window you want! Yay! Again - this works only in Vista, and only in Aero theme. (checked it with XP but it doesn't bring the desired effect since videos and windows are drawn diffirently)CODEexpandcollapse popup#include <GUIConstants.au3> #include <GuiListView.au3> Opt("WinTitleMatchMode", 2) Opt("TrayIconHide",1) GUICreate("Tran", 430, 203) GUISetState() $upd=GUICtrlCreateButton("update / reset", 10, 70, 90, 20) $ext=GUICtrlCreateButton("exit", 10, 100, 90, 20) $abt=GUICtrlCreateButton("?", 45, 130, 20, 20) GUICtrlCreateLabel("Visible",103,14) GUICtrlCreateLabel("Invisible",100,170) $sli=GUICtrlCreateSlider(110,30,20,140,$TBS_VERT) GUICtrlSetData(-1,0) GUICtrlSetLimit(-1,255,0) $list=GuiCtrlCreateListView("lol!",150,8,272,188) _GUICtrlListViewSetView($list,$LV_VIEW_TILE) global $lista, $prc[999], $hum=0, $last=0, $lasti="" Func update() GUICtrlSetData($sli,0) _GUICtrlListViewDeleteAllItems($list) $lista=WinList() $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") $colItems=$objWMIService.InstancesOf("Win32_Process") If IsObj($colItems) then For $objItem In $colItems For $lol=1 To $lista[0][0] Step +1 If $objItem.handle==WinGetProcess($lista[$lol][0]) AND $lista[$lol][0]<>"" AND BitAnd(WinGetState($lista[$lol][1]),2) AND NOT StringInStr($objItem.ExecutablePath,"explorer") Then WinSetTrans($lista[$lol][0],"",255) GuiCtrlCreateListViewItem($lista[$lol][0], $list) GUICtrlSetImage(-1,$objItem.ExecutablePath,0) $prc[$lol]=0 ExitLoop EndIf Next Next Endif EndFunc update() Do Sleep(10) if GUICtrlRead($sli)<>$last AND $hum<>GUICtrlRead($sli) Then For $lol=1 To $lista[0][0] Step +1 If $lista[$lol][0]==GUICtrlRead(GUICtrlRead($list)) Then WinSetTrans(GUICtrlRead(GUICtrlRead($list)),"",255-GUICtrlRead($sli)) $last=GUICtrlRead($sli) $prc[$lol]=GUICtrlRead($sli) ExitLoop EndIf Next EndIf if GUICtrlRead(GUICtrlRead($list))<>$lasti Then For $lol=1 To $lista[0][0] Step +1 If $lista[$lol][0]==GUICtrlRead(GUICtrlRead($list)) Then GUICtrlSetData($sli,$prc[$lol]) $lasti=GUICtrlRead(GUICtrlRead($list)) $hum=$prc[$lol] ExitLoop EndIf Next EndIf $msg=GUIGetMsg() if $msg==$upd Then update() ElseIf $msg==$abt Then MsgBox(64,"Yeah!","Another great program"&@CRLF&@CRLF&" by"&@CRLF&" er453r") ElseIf $msg==$GUI_EVENT_CLOSE OR $msg==$ext Then update() exit(0) EndIf until 0here are some screens: Edited May 12, 2007 by er453r
lod3n Posted May 11, 2007 Posted May 11, 2007 Could you post a screenshot for those of us who don't have Vista? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
er453r Posted May 12, 2007 Author Posted May 12, 2007 Ok, I've added some screens. I think they explain my goal perfectly A picture is worth a thousand words as they say
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now