James Posted December 17, 2006 Share Posted December 17, 2006 (edited) After having Vista for a while I got obsessed with the windows media player transparency. Then my computer broke and XP came back. http://www.autoitscript.com/fileman/users/gafrosts_wife/Emoticons/wave.gif Its also the first full script I have released without needing help from anyone. Celebrate! Version 1.2 was made with help:Thanks to: Helge and ThatsGreat2345 for helping adding quick keys and functions.So I decided to make this:expandcollapse popup;------------------------------------------ ; ; Name: Windows Media Player Transparency ; Author: Secure_ICT ; Version: 1.2 ; Credit given to: Helge and ThatsGreat2345 ; ;------------------------------------------ #include <GUIConstants.au3> ; Start GUI Setting GUICreate("Set Transparency",220,100, 100,200) ; Set title $slider = GUICtrlCreateSlider (10,10,200,20) ; Set slider GUICtrlSetLimit(-1,255,0) ; Set limit on slider $set = GUICtrlCreateButton ("Set State",75,50,70,20) ; Set the Set button $reset = GUICtrlCreateButton ("Reset",75,70,70,20) ; Set Reset button GUISetState() ; Set the state of GUI Window GUICtrlSetData($slider,127.5) ; Set slider half way on startup ; End GUI Setting ; Set HotKeys Global $Keys For $hotkeysetkey = 0 to 9 HotKeySet($hotkeysetkey, "urgeerbestingenprotest") next ; End HotKeys ;THIS FUNCTION WAS MADE BY HELGE AND THEREFORE IS COPYRIGHTED TO HIM AND MUST RECIEVE HIS CONSENT TO MODIFY IT Func urgeerbestingenprotest() Local $aTrans[10] = [0, 10, 50, 90, 100, 110, 150, 190, 210, 255] $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $aTrans[@HotKeyPressed]) ExitLoop WEnd EndFunc ; Start Main Script $start=TimerInit() Do $n = GUIGetMsg () If $n = $set Then ; Set the state WinSetTrans("Windows Media Player", "", GUICtrlRead($slider)) ; Set transparency of window by reading slider $start=TimerInit() EndIf If $n = $reset Then ; Reset the state WinSetTrans("Windows Media Player", "", 255) ; Reset the transparency of WMPlayer GUICtrlSetData($slider,255) ; Reset slider whilst your at it EndIf Until $n = $GUI_EVENT_CLOSE WinSetTrans("Windows Media Player", "", 255) ; When GUI is closed reset state ; End Main ScriptTell me what you think please.Edit: Fixed default to show cursor at 255 instead of middle.Secure Edited March 7, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
AzKay Posted December 17, 2006 Share Posted December 17, 2006 Works great, Though when its set as default, its completly invisible, so you have to have it on the right from the default. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
James Posted December 17, 2006 Author Share Posted December 17, 2006 Well the default sets the transparency at 255 and the cursor at the middle. So what you want me to do is make the cursor show at 255 when at default? OK, I edited it so that it does. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 18, 2006 Author Share Posted December 18, 2006 Someone else has goto comment on this maybe? I thought it was pretty good. If you dont, tell me what could make it better. Please. Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 18, 2006 Share Posted December 18, 2006 short cuts like Ctrl + + hahah weird will make it up and then Ctrl + - goes down Link to comment Share on other sites More sharing options...
James Posted December 18, 2006 Author Share Posted December 18, 2006 Hmm yeah, thats a good idea. I will add that later. Thanks Thatsgreat! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 18, 2006 Author Share Posted December 18, 2006 (edited) Update Version 1.1Added Default values set as (0,1,2,3,4,5,6,7,8,9)Changed some comments (messed up)Hotkeys change defaultsexpandcollapse popup;------------------------------------------ ; ; Name: Windows Media Player Transparency ; Author: Secure_ICT ; Version: 1.1 ; ;------------------------------------------ #include <GUIConstants.au3> ; Presets $0 = 0 $10 = 10 $50 = 50 $90 = 90 $100 = 100 $110 = 110 $150 = 150 $190 = 190 $200 = 200 $210 = 210 $255 = 255 ; End Presets ; Start GUI Setting GUICreate("Set Transparency",220,100, 100,200) ; Set title $slider = GUICtrlCreateSlider (10,10,200,20) ; Set slider GUICtrlSetLimit(-1,255,0) ; Set limit on slider $set = GUICtrlCreateButton ("Set State",75,50,70,20) ; Set the Set button $reset = GUICtrlCreateButton ("Reset",75,70,70,20) ; Set Reset button GUISetState() ; Set the state of GUI Window GUICtrlSetData($slider,127.5) ; Set slider half way on startup ; End GUI Setting ; Set HotKeys Global $Keys HotKeySet("0", "none") HotKeySet("1", "ten") HotKeySet("2", "fifty") HotKeySet("3", "ninty") HotKeySet("4", "oneh") HotKeySet("5", "onet") HotKeySet("6", "onef") HotKeySet("7", "onen") HotKeySet("8", "twot") HotKeySet("9", "twoff") ; End HotKeys ; Start Functions Func none() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $0) ExitLoop WEnd EndFunc Func ten() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $10) ExitLoop WEnd EndFunc Func fifty() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $50) ExitLoop WEnd EndFunc Func ninty() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $90) ExitLoop WEnd EndFunc Func oneh() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $100) ExitLoop WEnd EndFunc Func onet() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $110) ExitLoop WEnd EndFunc Func onef() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $150) ExitLoop WEnd EndFunc Func onen() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $190) ExitLoop WEnd EndFunc Func twot() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $210) ExitLoop WEnd EndFunc Func twoff() $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $255) ExitLoop WEnd EndFunc ; End Functions ; Start Main Script $start=TimerInit() Do $n = GUIGetMsg () If $n = $set Then ; Set the state WinSetTrans("Windows Media Player", "", GUICtrlRead($slider)) ; Set transparency of window by reading slider $start=TimerInit() EndIf If $n = $reset Then ; Reset the state WinSetTrans("Windows Media Player", "", 255) ; Reset the transparency of WMPlayer GUICtrlSetData($slider,255) ; Reset slider whilst your at it EndIf Until $n = $GUI_EVENT_CLOSE WinSetTrans("Windows Media Player", "", 255) ; When GUI is closed reset state ; End Main ScriptPlease comment. Edited December 18, 2006 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Helge Posted December 18, 2006 Share Posted December 18, 2006 (edited) Instead of having 10 different functions that are almost identical, you can just make the hotkeys point to thesame function and then with the help of the @HotKeyPressed macro you can shorten the code drastically.UNTESTED:Func urgeerbestingenprotest() Local $aTrans[10] = [0, 10, 50, 90, 100, 110, 150, 190, 210, 255] $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $aTrans[@HotKeyPressed]) ExitLoop WEnd EndFunc Edited December 18, 2006 by Helge Link to comment Share on other sites More sharing options...
James Posted December 18, 2006 Author Share Posted December 18, 2006 ? I dont have a clue what to do with this. I've tried a couple of things, but its not working. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 18, 2006 Share Posted December 18, 2006 His function uses an array, the numbers are set in the array corresponded with the hotkeys pressed, example press 0, that coressponds with 0 trans, press 1 it corresponds with 10 , it does it by using the @hotkeypressed macro which when 0 is pressed will return 0, thus grabbing the 0 slot in the array which is 0. When 1 is pressed itll return 1, thus grabbing the 1 slot in the array which is 10 not tested just dropped it in expandcollapse popup;------------------------------------------ ; ; Name: Windows Media Player Transparency ; Author: Secure_ICT ; Version: 1.1 ; ;------------------------------------------ #include <GUIConstants.au3> ; Start GUI Setting GUICreate("Set Transparency",220,100, 100,200) ; Set title $slider = GUICtrlCreateSlider (10,10,200,20) ; Set slider GUICtrlSetLimit(-1,255,0) ; Set limit on slider $set = GUICtrlCreateButton ("Set State",75,50,70,20) ; Set the Set button $reset = GUICtrlCreateButton ("Reset",75,70,70,20) ; Set Reset button GUISetState() ; Set the state of GUI Window GUICtrlSetData($slider,127.5) ; Set slider half way on startup ; End GUI Setting ; Set HotKeys Global $Keys HotKeySet("0", "tran") HotKeySet("1", "tran") HotKeySet("2", "tran") HotKeySet("3", "tran") HotKeySet("4", "tran") HotKeySet("5", "tran") HotKeySet("6", "tran") HotKeySet("7", "tran") HotKeySet("8", "tran") HotKeySet("9", "tran") Func tran() Local $aTrans[10] = [0, 10, 50, 90, 100, 110, 150, 190, 210, 255] $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $aTrans[@HotKeyPressed]) ExitLoop WEnd EndFunc ; Start Main Script $start=TimerInit() Do $n = GUIGetMsg () If $n = $set Then ; Set the state WinSetTrans("Windows Media Player", "", GUICtrlRead($slider)) ; Set transparency of window by reading slider $start=TimerInit() EndIf If $n = $reset Then ; Reset the state WinSetTrans("Windows Media Player", "", 255) ; Reset the transparency of WMPlayer GUICtrlSetData($slider,255) ; Reset slider whilst your at it EndIf Until $n = $GUI_EVENT_CLOSE WinSetTrans("Windows Media Player", "", 255) ; When GUI is closed reset state ; End Main Script Link to comment Share on other sites More sharing options...
James Posted December 18, 2006 Author Share Posted December 18, 2006 Thanks ThatsGreat. Lol its ironic, because thats great that you helped me! Thanks dude. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Helge Posted December 18, 2006 Share Posted December 18, 2006 ? I dont have a clue what to do with this. I've tried a couple of things, but its not working....you can just make the hotkeys point to the same function... I gave you the function to point them to..I thought that was pretty obvious.Son of a bitch, thatsgreat ! You're rude enough to modify the code when you removed the space in it, but yourenamed the function as well !! You even received the entire credits for it ! Oh my !!!11oneone Gule tresko !! Link to comment Share on other sites More sharing options...
James Posted December 19, 2006 Author Share Posted December 19, 2006 He didn't recieve all the credits, because obviously i did make the script, you and him just added a function or two. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Paulie Posted December 19, 2006 Share Posted December 19, 2006 Gule tresko !!Generous Tresko? Link to comment Share on other sites More sharing options...
clearguy Posted December 19, 2006 Share Posted December 19, 2006 (edited) Nice work. Edit:a little problem, but it wasn't one:p Edited December 19, 2006 by clearguy I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
James Posted December 19, 2006 Author Share Posted December 19, 2006 Thanks. What problem did you encounter? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 20, 2006 Share Posted December 20, 2006 ...you can just make the hotkeys point to the same function... I gave you the function to point them to.. I thought that was pretty obvious. Son of a bitch, thatsgreat ! You're rude enough to modify the code when you removed the space in it, but you renamed the function as well !! You even received the entire credits for it ! Oh my !!!11oneone Gule tresko !! what did i do im sorry , i couldnt understand the function name so i changed it , removed the space in it? im so confused xD im sorry BETTER ? expandcollapse popup;------------------------------------------ ; ; Name: Windows Media Player Transparency ; Author: Secure_ICT ; Version: 1.1 ; ;------------------------------------------ #include <GUIConstants.au3> ; Start GUI Setting GUICreate("Set Transparency",220,100, 100,200) ; Set title $slider = GUICtrlCreateSlider (10,10,200,20) ; Set slider GUICtrlSetLimit(-1,255,0) ; Set limit on slider $set = GUICtrlCreateButton ("Set State",75,50,70,20) ; Set the Set button $reset = GUICtrlCreateButton ("Reset",75,70,70,20) ; Set Reset button GUISetState() ; Set the state of GUI Window GUICtrlSetData($slider,127.5) ; Set slider half way on startup ; End GUI Setting ; Set HotKeys Global $Keys HotKeySet("0", "urgeerbestingenprotest") HotKeySet("1", "urgeerbestingenprotest") HotKeySet("2", "urgeerbestingenprotest") HotKeySet("3", "urgeerbestingenprotest") HotKeySet("4", "urgeerbestingenprotest") HotKeySet("5", "urgeerbestingenprotest") HotKeySet("6", "urgeerbestingenprotest") HotKeySet("7", "urgeerbestingenprotest") HotKeySet("8", "urgeerbestingenprotest") HotKeySet("9", "urgeerbestingenprotest") ; End HotKeys ;THIS FUNCTION WAS MADE BY HELGE AND THEREFORE IS COPYRIGHTED TO HIM AND MUST RECIEVE HIS CONSENT TO MODIFY IT :) Func urgeerbestingenprotest() Local $aTrans[10] = [0, 10, 50, 90, 100, 110, 150, 190, 210, 255] $Keys = NOT $Keys While $Keys Sleep(100) GUICtrlSetData($slider, $aTrans[@HotKeyPressed]) ExitLoop WEnd EndFunc ; Start Main Script $start=TimerInit() Do $n = GUIGetMsg () If $n = $set Then ; Set the state WinSetTrans("Windows Media Player", "", GUICtrlRead($slider)) ; Set transparency of window by reading slider $start=TimerInit() EndIf If $n = $reset Then ; Reset the state WinSetTrans("Windows Media Player", "", 255) ; Reset the transparency of WMPlayer GUICtrlSetData($slider,255) ; Reset slider whilst your at it EndIf Until $n = $GUI_EVENT_CLOSE WinSetTrans("Windows Media Player", "", 255) ; When GUI is closed reset state ; End Main Script Link to comment Share on other sites More sharing options...
James Posted December 20, 2006 Author Share Posted December 20, 2006 ? urgeer bestingen protest ? Thanks guys. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 20, 2006 Share Posted December 20, 2006 by the way dude u gave crap credit to helge i only showed u how to put it in , u should probaly give him thanks since , he basically programmed half of the program so i dont how you can say i did make the scriptat the moment im just tired of people recieving help and then stealing all the credit Link to comment Share on other sites More sharing options...
James Posted December 21, 2006 Author Share Posted December 21, 2006 Hey sorry. I didn't add credit, the original was made by moi. Ill edit the original post with credit and the new version. Oh by the way: Would it be better, if when you closed it, the transparency would stay the same? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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