Hothr

Untitled

Jan 13th, 2017
27,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. ; April Fools Script 2009
  2. ; Made by Hothr, March 2009
  3. ;
  4. ; FEATURES:
  5. ; Doesn't do anything until 10am on april 1st.
  6. ; Insalls itself to startup section, and runs itself.
  7. ; Deletes itself from startup when Windows+0 is pressed, or after April 1st.
  8. ;
  9. ; JOKES:
  10. ; Slowly makes the mouse "drift" when user has been idle.
  11. ; Plays logoff and shutdown sounds (unmute + max volume) when backspace or del are pressed
  12. ; Recommends shaking the mouse to fix the problem.
  13. ;
  14. ; Now, go compile this and run it on eveyone you know's computer!
  15. ;
  16.  
  17. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  18. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  19. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  20. #InstallKeybdHook
  21. #InstallMouseHook
  22. #NoTrayIcon
  23. #SingleInstance FORCE
  24.  
  25. annoyancecount := 0
  26. AprF := 401
  27. AprF_Month := 04
  28. AprF_Day := 01
  29. AprF_Hour := 11
  30. ItIsTime := 0
  31.  
  32. IfInString, A_ScriptDir, \Programs\Startup
  33. annoyancecount := 0
  34. else
  35. {
  36. FileCopy %A_ScriptFullPath%, %A_Startup% ,1
  37. Location := A_Startup . "\" . A_ScriptName
  38. Run, %Location%
  39. ExitApp
  40. }
  41.  
  42. #Persistent
  43. FormatTime, TodayIs, ,Mdd
  44.  
  45. SetTimer, CheckTime, 1000
  46.  
  47. If (TodayIs > AprF)
  48. Gosub, CleanUpNow
  49. If (ItIsTime = 1)
  50. SetTimer, CrazyMove, 1000
  51. return
  52.  
  53. ~BS::
  54. {
  55. If (ItIsTime = 1)
  56. {
  57. ; Backup the volume and make sure it isn't muted
  58. SoundGet, volumeBackup
  59. SoundGet, master_mute, , mute
  60. if master_mute = on
  61. SoundSet, +1, , mute
  62. ; Set it to the highest volume
  63. SoundSet, +100
  64. SoundPlay, %A_WinDir%\Media\Windows XP Logoff Sound.wav, 1
  65. If master_mute = on
  66. SoundSet, +1, , mute
  67. soundset, %volumeBackup%
  68. }
  69. return
  70. }
  71.  
  72. CheckTime:
  73. {
  74. If (A_MM = AprF_Month)
  75. {
  76. If (A_DD = AprF_Day)
  77. {
  78. If (A_Hour >= AprF_Hour)
  79. ItIsTime := 1
  80. else
  81. ItIsTime :=0
  82. }
  83. else
  84. ItIsTime :=0
  85. }
  86. else
  87. ItIsTime :=0
  88. return
  89. }
  90.  
  91. ~Del::
  92. {
  93. If (ItIsTime = 1)
  94. {
  95. SoundGet, volumeBackup
  96. SoundGet, master_mute, , mute
  97. if master_mute = on
  98. SoundSet, +1, , mute
  99. ; Set it to the highest volume
  100. SoundSet, +100
  101. SoundPlay, %A_WinDir%\Media\Windows XP Shutdown.wav, 1
  102. If master_mute = on
  103. SoundSet, +1, , mute
  104. soundset, %volumeBackup%
  105. }
  106. return
  107. }
  108.  
  109. ~#0::
  110. {
  111.  
  112. If (ItIsTime = 1)00
  113. {
  114. msgbox, 262196, APRIL FOOLS! , See You Next Year!
  115. Gosub, CleanUpNow
  116. }
  117. }
  118.  
  119. CrazyMove:
  120. {
  121. loop
  122. {
  123. if(A_timeIdlePhysical < 5000)
  124. break
  125. random xmov, -2, 2
  126. random ymov, -2, 2
  127. Loop 150
  128. {
  129. If (A_TimeIdlePhysical <5000)
  130. {
  131. annoyancecount++
  132. If (annoyancecount=10 or annoyancecount =20)
  133. MsgBox, 262193, Error:, Mouse Error 401: This can usually be fixed by shaking your mouse. , 180
  134. If (annoyancecount=30)
  135. MsgBox, 0, APRIL FOOLS!, You've Been Fooled!.`nPress 'Windows+0' to stop the insanity
  136. If (annoyancecount>50)
  137. MsgBox, 0, APRIL FOOLS!, You've Been Fooled!.`nPress 'Windows+0' to stop the insanity
  138. break
  139. }
  140. MouseMove, xmov, ymov, ,R
  141. Sleep 10
  142. }
  143. }
  144. return
  145. }
  146.  
  147. CleanUpNow:
  148. {
  149. waiter := "ping -n 1 -w 1000 1.1.1.1 >nul"
  150. FileAppend, %waiter%`nDEL "%A_ScriptFullPath%"`nDEL "%A_ScriptDir%\del.bat", del.bat
  151. Loop
  152. {
  153. if (FileExist("del.bat"))
  154. break
  155. }
  156. Run, del.bat,, Hide
  157. ExitApp
  158. }
  159.  
  160. #=:: Msgbox, %A_MM% and %A_DD% and %A_Hour% itistime: %ItIsTime%
Advertisement
Add Comment
Please, Sign In to add comment