Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - ; April Fools Script 2009
 - ; Made by Hothr, March 2009
 - ;
 - ; FEATURES:
 - ; Doesn't do anything until 10am on april 1st.
 - ; Insalls itself to startup section, and runs itself.
 - ; Deletes itself from startup when Windows+0 is pressed, or after April 1st.
 - ;
 - ; JOKES:
 - ; Slowly makes the mouse "drift" when user has been idle.
 - ; Plays logoff and shutdown sounds (unmute + max volume) when backspace or del are pressed
 - ; Recommends shaking the mouse to fix the problem.
 - ;
 - ; Now, go compile this and run it on eveyone you know's computer!
 - ;
 - #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
 - SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
 - SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
 - #InstallKeybdHook
 - #InstallMouseHook
 - #NoTrayIcon
 - #SingleInstance FORCE
 - annoyancecount := 0
 - AprF := 401
 - AprF_Month := 04
 - AprF_Day := 01
 - AprF_Hour := 11
 - ItIsTime := 0
 - IfInString, A_ScriptDir, \Programs\Startup
 - annoyancecount := 0
 - else
 - {
 - FileCopy %A_ScriptFullPath%, %A_Startup% ,1
 - Location := A_Startup . "\" . A_ScriptName
 - Run, %Location%
 - ExitApp
 - }
 - #Persistent
 - FormatTime, TodayIs, ,Mdd
 - SetTimer, CheckTime, 1000
 - If (TodayIs > AprF)
 - Gosub, CleanUpNow
 - If (ItIsTime = 1)
 - SetTimer, CrazyMove, 1000
 - return
 - ~BS::
 - {
 - If (ItIsTime = 1)
 - {
 - ; Backup the volume and make sure it isn't muted
 - SoundGet, volumeBackup
 - SoundGet, master_mute, , mute
 - if master_mute = on
 - SoundSet, +1, , mute
 - ; Set it to the highest volume
 - SoundSet, +100
 - SoundPlay, %A_WinDir%\Media\Windows XP Logoff Sound.wav, 1
 - If master_mute = on
 - SoundSet, +1, , mute
 - soundset, %volumeBackup%
 - }
 - return
 - }
 - CheckTime:
 - {
 - If (A_MM = AprF_Month)
 - {
 - If (A_DD = AprF_Day)
 - {
 - If (A_Hour >= AprF_Hour)
 - ItIsTime := 1
 - else
 - ItIsTime :=0
 - }
 - else
 - ItIsTime :=0
 - }
 - else
 - ItIsTime :=0
 - return
 - }
 - ~Del::
 - {
 - If (ItIsTime = 1)
 - {
 - SoundGet, volumeBackup
 - SoundGet, master_mute, , mute
 - if master_mute = on
 - SoundSet, +1, , mute
 - ; Set it to the highest volume
 - SoundSet, +100
 - SoundPlay, %A_WinDir%\Media\Windows XP Shutdown.wav, 1
 - If master_mute = on
 - SoundSet, +1, , mute
 - soundset, %volumeBackup%
 - }
 - return
 - }
 - ~#0::
 - {
 - If (ItIsTime = 1)00
 - {
 - msgbox, 262196, APRIL FOOLS! , See You Next Year!
 - Gosub, CleanUpNow
 - }
 - }
 - CrazyMove:
 - {
 - loop
 - {
 - if(A_timeIdlePhysical < 5000)
 - break
 - random xmov, -2, 2
 - random ymov, -2, 2
 - Loop 150
 - {
 - If (A_TimeIdlePhysical <5000)
 - {
 - annoyancecount++
 - If (annoyancecount=10 or annoyancecount =20)
 - MsgBox, 262193, Error:, Mouse Error 401: This can usually be fixed by shaking your mouse. , 180
 - If (annoyancecount=30)
 - MsgBox, 0, APRIL FOOLS!, You've Been Fooled!.`nPress 'Windows+0' to stop the insanity
 - If (annoyancecount>50)
 - MsgBox, 0, APRIL FOOLS!, You've Been Fooled!.`nPress 'Windows+0' to stop the insanity
 - break
 - }
 - MouseMove, xmov, ymov, ,R
 - Sleep 10
 - }
 - }
 - return
 - }
 - CleanUpNow:
 - {
 - waiter := "ping -n 1 -w 1000 1.1.1.1 >nul"
 - FileAppend, %waiter%`nDEL "%A_ScriptFullPath%"`nDEL "%A_ScriptDir%\del.bat", del.bat
 - Loop
 - {
 - if (FileExist("del.bat"))
 - break
 - }
 - Run, del.bat,, Hide
 - ExitApp
 - }
 - #=:: Msgbox, %A_MM% and %A_DD% and %A_Hour% itistime: %ItIsTime%
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment