Advertisement
jdm001

JimmerScripts - Gaming Screen Saver

Jul 11th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2. #Persistent
  3. SetTitleMatchMode, 2
  4. DetectHiddenText, On
  5. DetectHiddenWindows, ON
  6.  
  7. ; ------------------------------------------------------------------------
  8. ; This is the USER CHANGE VARIABLE SECTION --- USER CHANE THE LINE BELOW -
  9. ; Enter in seconds (1000 = 1 second) delay before screensaver begins. ----
  10. Time_to_start := 5000      ;Default is 5 minutes (50000) -----------------
  11. ; The rest below shouldn't be changed unless you know what you are doing.-
  12. ; ________________________________________________________________________
  13.  
  14.  
  15. ;MsgBox, Current Working Directory:`n %A_ScriptDir%
  16. ;OldWD = %A_ScriptDir%
  17.  
  18.  
  19. SetTimer, SSTimer, 1000      ; Check to see when you are idle
  20. Return
  21.  
  22. SSTimer:
  23. If A_TimeIdle >= %Time_to_start% ; Start Desktop ScreenSaver after idle Time of XX sec
  24. {
  25.     If WinExist("ahk_exe DesktopHut.exe")
  26.     {
  27.         ; Sleep
  28.     }
  29.     else
  30.     {  
  31.         Run, DesktopHut.exe, D:\Arcade\System roms\Utility\DHut\, Min
  32.         ;Run, D:\Arcade\System roms\Utility\DHut2\DesktopHut.exe, ,Min
  33.         Sleep, 500
  34.         Send #d
  35.         MsgBox, The screen Saver is now ON `n %ErrorLevel% `n %A_LastError%
  36.     }
  37. }
  38.  
  39.  
  40. If A_TimeIdlePhysical < 100 ; Stop VLC
  41.     {
  42.         If WinExist("ahk_exe DesktopHut.exe")
  43.         {
  44.             Process, Close, DesktopHut.exe
  45.             SoundBeep
  46.             Send #d
  47.         }
  48.         else
  49.         {
  50.         }
  51.        
  52.     }
  53.  
  54. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement