sandman Posted June 26, 2007 Share Posted June 26, 2007 (edited) I just kinda whipped this up out of boredom, but I enjoy it. I always love a little transparency in Windows to give everything that high-tech look.Controls: Press Num-Pad Add to increase the current window's transparency, Num-Pad Subtract to decrease the current window's transparency, and Num-Pad Multiply to set a custom value between 0 and 255 and set it as the current window's transparency.Note that all increments and decrements are RELATIVE to the current transparency of the window. They increment and decrement by 10, so if the current transparency of a window was 200, and I pressed Num-Pad Subtract, it would then be 190.This currently is only known to work on Windows XP, please PM me if you would like to test it on Vista for me, as I don't have a Vista computer Thank you MsCreator and Valik, MsCreator for showing me Valik's WinGetTrans function, and Valik for writing it.Aaaaaaaaaand.... the very short source code:expandcollapse popup; TransIt ; Just a little scrap.. I find it useful though. ; MoreTrans() and LessTrans() are compatible with XP only. Vista has not yet been tested. HotKeySet("{NUMPADADD}", "MoreTrans") HotKeySet("{NUMPADSUB}", "LessTrans") HotKeySet("{NUMPADMULT}", "SetTrans") While 1 Sleep(10) WEnd Func SetTrans() $active = WinGetTitle("") $input = InputBox("TransIt", "Please enter a transparency level (being between 0 and 255.") If $input < 0 Or $input > 255 Then MsgBox(0, "TransIt", "That was an invalid number!") Else WinSetTrans($active, "", Int($input)) EndIf EndFunc Func MoreTrans() Local $active = WinGetTitle("") If WinGetTrans($active) = 255 Then ; do nothing Else WinSetTrans($active, "", WinGetTrans($active) + 10) EndIf EndFunc Func LessTrans() Local $active = WinGetTitle("") If WinGetTrans($active) = 0 Then ; do nothing Else WinSetTrans($active, "", WinGetTrans($active) - 10) EndIf EndFunc ; I did not write the below function. It is by Valik; I acquired it through MsCreator. Func WinGetTrans($sTitle, $sText = "") Local $hWnd = WinGetHandle($sTitle, $sText) If Not $hWnd Then Return -1 Local $aRet = DllCall("user32.dll", "int", "GetLayeredWindowAttributes", "hwnd", $hWnd, "ptr", 0, "int_ptr", 0, "ptr", 0) If @error Or Not $aRet[0] Then Return -1 Return $aRet[3] EndFuncEnjoy!TransIT.au3 Edited November 11, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
sandman Posted June 26, 2007 Author Share Posted June 26, 2007 (edited) 28 views and no comments? ;( Edited June 26, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Valuater Posted June 26, 2007 Share Posted June 26, 2007 Cool... There are a couple of these in Example scripts anyways.... If WinGetTrans($active) = 225 Then ; do nothing doesn't set the window to 100%, you can still see through it Link to comment Share on other sites More sharing options...
Klexen Posted June 26, 2007 Share Posted June 26, 2007 Just wanted to let you know that it does work in Vista. Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 26, 2007 Share Posted June 26, 2007 lol thats awesome. i dont think it should loop around to 0 if it reaches 255 and + is pressed though My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
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