DonationCoder.com Software > Skrommel's Software
A couple small modifications to TrayScreenSaver
(1/1)
VodkaL:
Tell me what you think, and feel free to use it.
--- Code: AutoIt ---;TrayScreenSaver.ahk; Control the screensaver from the tray;Skrommel @ 2006 #SingleInstance,Force#Persistent applicationname=TrayScreenSaver Gosub,TRAYMENUGosub,ACTIVEReturn TRAYMENU:savers=Loop,%A_WinDir%\*.scr savers=%savers%%A_LoopFileName%`nLoop,%A_WinDir%\System32\*.scr savers=%savers%%A_LoopFileName%`nStringSplit,savers_,savers,`nsavers_0-=1 Menu,Tray,Click,1 Menu,Tray,NoStandard Menu,Tray,DeleteAll Menu,Tray,Add,%applicationname%,DOUBLECLICKMenu,Tray,Add, Menu,savermenu,add,Menu,tray,add,Saver Menu, :savermenu Loop,%savers_0%{ screensaver:=savers_%A_Index% Menu,savermenu,Add,%screensaver%,SELECT} Menu,Tray,Add,Menu,Tray,Add,Power &Off Monitor,OffMenu,Tray,Add,&Run,RUNMenu,Tray,Add,&Enabled,TOGGLEMenu,Tray,Add,&Settings...,SETTINGSMenu,Tray,Add,Menu,Tray,Add,&About...,ABOUTMenu,Tray,Add,E&xit,EXIT Menu,Tray,Default,%applicationname%Menu,Tray,Check,&EnabledMenu,Tray,Tip,%applicationname% Return SELECT:Run,%A_ThisMenuItem% /sReturn SINGLECLICK:SetTimer,SINGLECLICK,Off clicks=Gosub,TOGGLEReturn DOUBLECLICK: If clicks= { SetTimer,SINGLECLICK,500 clicks=1 Return } SetTimer,SINGLECLICK,Off clicks= Gosub,RUNReturn TOGGLE:RegRead,active,HKEY_CURRENT_USER,Control Panel\Desktop,ScreenSaveActiveIf active=1 active=0Else active=1RegWrite,Reg_SZ,HKEY_CURRENT_USER,Control Panel\Desktop,ScreenSaveActive,%active%Gosub,ACTIVEReturn ACTIVE:RegRead,active,HKEY_CURRENT_USER,Control Panel\Desktop,ScreenSaveActiveIf active=1{ Menu,Tray,Icon,%applicationname%.exe,1,1 Menu,Tray,Check,&Enabled}Else{ Menu,Tray,Icon,%applicationname%.exe,4,4 Menu,Tray,UnCheck,&Enabled}Return RUN:RegRead,screensaver,HKEY_CURRENT_USER,Control Panel\Desktop,ScrnSave.ExeIfInString,screensaver,.scr Run,%screensaver% /sElse Gosub,SETTINGSReturn Off:Sleep 1000SendMessage, 0x112, 0xF170, 2,, Program ManagerReturn SETTINGS:RegRead,screensaver,HKEY_CURRENT_USER,Control Panel\Desktop,ScrnSave.ExeRun,rundll32.exe desk.cpl`,InstallScreenSaver %screensaver%Return ABOUT:Gui,99:DestroyGui,99:Margin,20,20Gui,99:Add,Picture,xm Icon1,%applicationname%.exeGui,99:Font,BoldGui,99:Add,Text,x+10 yp+10,%applicationname% v1.0Gui,99:FontGui,99:Add,Text,y+10,Control the screensaver from the trayGui,99:Add,Text,y+5,- Singleclick to enable or disable the screensaverGui,99:Add,Text,y+5,- Doubleclick the tray icon to run the default screensaverGui,99:Add,Text,y+5,- Run any screensaver from the tray menuGui,99:Add,Text,y+5,- Change settings using Settings in the tray menu Gui,99:Add,Picture,xm y+20 Icon5,%applicationname%.exeGui,99:Font,BoldGui,99:Add,Text,x+10 yp+10,1 Hour Software by SkrommelGui,99:FontGui,99:Add,Text,y+10,For more tools, information and donations, please visit Gui,99:Font,CBlue UnderlineGui,99:Add,Text,y+5 G1HOURSOFTWARE,www.1HourSoftware.comGui,99:Font Gui,99:Add,Picture,xm y+20 Icon7,%applicationname%.exeGui,99:Font,BoldGui,99:Add,Text,x+10 yp+10,DonationCoderGui,99:FontGui,99:Add,Text,y+10,Please support the contributors atGui,99:Font,CBlue UnderlineGui,99:Add,Text,y+5 GDONATIONCODER,www.DonationCoder.comGui,99:Font Gui,99:Add,Picture,xm y+20 Icon6,%applicationname%.exeGui,99:Font,BoldGui,99:Add,Text,x+10 yp+10,AutoHotkeyGui,99:FontGui,99:Add,Text,y+10,This tool was made using the powerfulGui,99:Font,CBlue UnderlineGui,99:Add,Text,y+5 GAUTOHOTKEY,www.AutoHotkey.comGui,99:Font Gui,99:Show,,%applicationname% AbouthCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HANDOnMessage(0x200,"WM_MOUSEMOVE") Return 1HOURSOFTWARE: Run,http://www.1hoursoftware.com,,UseErrorLevelReturn DONATIONCODER: Run,http://www.donationcoder.com,,UseErrorLevelReturn AUTOHOTKEY: Run,http://www.autohotkey.com,,UseErrorLevelReturn 99GuiClose: Gui,99:Destroy OnMessage(0x200,"") DllCall("DestroyCursor","Uint",hCur)Return WM_MOUSEMOVE(wParam,lParam){ Global hCurs MouseGetPos,,,,ctrl If ctrl in Static10,Static14,Static18 DllCall("SetCursor","UInt",hCurs) Return}Return EXIT:ExitApp
If you dont have his icons and compile the script, you can just put the script in the same folder as his exe and run the script
VodkaL
Navigation
[0] Message Index
Go to full version