I have made a few programs for my room mate that i prank.
This one slowly makes a window go to 0% transparency in a little over an hour. Then reverts the window back to 100%
Code:
WinGetTitle, Title1, A ;gets the title of the current focus window
var = 255 ; sets var at 255
while var > 0 ; exits loop when transparency is 0.
{
sleep 20000 ; 20 second pause
var-=1 ; reduces transparency "var" by 1
WinSet, Transparent,%var%,%title1% ;puts it all into action
}
sleep 5000 ; when transparency is at 0 it exits loop, waits 5 seconds
WinSet, Transparent,255,%title1% ; puts window back to 100% (255) before exiting.
exitapp
The next one chain invis windows. It gets the current focus, invis the window, minimizes, gets another window and repeats. when all windows are minimized it exists
Code:
title = something ; just to give the var "title" something so it doesn't exit instantly
loop,
{
WinGetTitle, Title, A ; gets current focus
ifequal,title, ; if no more titles
exitapp ; exit!
var = 255 ; else sets var at 255
while var > 0
{
; sleep 5 ; if you want to slow down the amount of time, add this or increases the sleep number
var-=1 ; if you want to speed up the amount of time increase "1" to a higher number
WinSet, Transparent,%var%,%Title% ; puts it all into motion
}
WinMinimize, %Title% ; minimizes the window that was made transparent
WinSet, Transparent,255,%Title% ; sets it back to 100%
;sleep 2000 ; waits 2 seconds, optional
} ; goes back to grab another focus window and repeats
This one pulls a trick from the matrix (
http://www.youtube.com/watch?v=ravcpOVEDHo ) . You can change the speed of typing ( with {SetKeyDelay, 200} ), pauses and text.
Code:
sleep 5000
fileappend,,%A_Desktop%\I see you.txt
run, %A_Desktop%\I see you.txt,,max
sleep 50
WinActivate, I see you - Notepad
sleep 50
blockinput, on
sleep 4000
SetKeyDelay, 190
send Wake up. {SetKeyDelay, 130}
sleep 1500
send Neo...
sleep 1500
send {backspace}{backspace}{backspace}{backspace}{backspace}{backspace}{SetKeyDelay, 200}AutoHotkey... {SetKeyDelay, 120}
sleep 2000
send The Matrix has you... {SetKeyDelay, 130}
sleep 3500
send Follow the white bunneh. {SetKeyDelay, 130}
sleep 3000
send Knock, Knock, Neo.
sleep 2000
SetKeyDelay, 0
send ^s
WinClose, I see you - Notepad
FileDelete, %A_Desktop%\I see you.txt
blockinput, off
return
This one just flickers on and off randomly. ctrl P to pause it. moves mouse to top left, so you can exit the program.
Code:
#Persistent
SetTimer, WatchCaret, 5
return
WatchCaret:
MouseGetPos,mousex,mousey
ToolTip, Are you sure you want to click on that? Looks like a virus to me.,mousex+10,mousey+15 ; you can change the text after tooltip, and play around with the text location
^p::
{
; exitapp ; or just use this
mousemove,00-1000,00-1000
pause
}
return
Then we have some smaller fun ones.
Code:
msgbox, You win a free gift!
drive, eject,
msgbox, A new Cup Holder!
Code:
MsgBox,16, Fatal Error,Abort Current Task,
Code:
mousemove, 75, 50, 25, r
Code:
sleep 60000
random,rannum3, 1,60
Ifless,rannum3,30
send {Backspace}
and the good ol turn the monitor off
Code:
; Turns Monitor Off
blockinput, on
SendMessage, 0x112, 0xF170, 2,, Program Manager
sleep 5000
; hopefully turnsback on lol
SendMessage, 0x112, 0xF170, -1,, Program Manager
blockinput, off