Advertisement
0b1ivi0nwa1k3r

April Fools joke

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