paschalism

Noise.ahk

May 14th, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Noise.ahk
  2. ; Sends keystrokes to keep the PC from falling asleep
  3. ;Skrommel @2005
  4.  
  5. #SingleInstance,Force
  6. DetectHiddenWindows,On
  7. SetKeyDelay,0,0
  8.  
  9. Menu,Tray,NoStandard
  10. Menu,Tray,Add,&Show,SHOW
  11. Menu,Tray,Add,E&xit,ButtonQuit
  12. Menu,Tray,Default,&Show
  13.  
  14. Gui,+Owner -AlwaysOnTop -Disabled +SysMenu +Caption +Border +ToolWindow
  15. Gui,Add,Edit,vchars
  16. Gui,Add,Button,default,Quit
  17. Gui,Show,,Noise!
  18. Gui,Hide
  19. SetTimer,MAKENOISE,60000
  20. Return
  21.  
  22. MAKENOISE:
  23. If A_TimeIdlePhysical<60000
  24.   Return
  25. chars=
  26. GuiControl,,chars
  27. Random,char,65,90   ;97,122
  28. Transform,char,CHR,%char%
  29. ControlSend,Edit1,{Blind}%char%,Noise!
  30. Return
  31.  
  32. SHOW:
  33. Gui,Show
  34. Return
  35.  
  36. GuiClose:
  37. GuiEscape:
  38. Gui,Hide
  39. Return
  40.  
  41. ButtonQuit:
  42. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment