; Last updated 1-31-11(2) /* Bug and format fixes, removed Chrome as an option due to errors. */ #singleinstance force ; Begin update section Progress, b w200,, Checking for Updates..., Updating Update: URLDownloadToFile, http://www.autohotkey.net/~Tchnclfl/EasySurfer/EasySurfer.ahk, update.txt Progress, 20 FileReadLine, update, update.txt, 1 Progress, 40 if (update = "; Last updated 1-31-11(2)") { FileDelete, update.txt Progress, 100 sleep, 700 Progress, Off GoTo AfterUpdate } else { if (update = "") { Progress, 100 sleep, 700 Progress, Off msgbox, There may be a new version of EasySurfer available, but there was a problem connecting to the server. Please diagnose your internet connection and try again. GoTo AfterUpdate } else { Progress, 60 FileReadLine, reason, update.txt, 3 Progress, 100 Progress, Off msgbox, A new version of EasySurfer has been released! Please press F6 to update to the latest version, or F4 to continue with this version.`n`nReson for update: %reason% F6:: FileCopy, update.txt, EasySurfer.ahk, 1 FileDelete, update.txt Progress, b w200,, Checking for Updates..., Updating Progress, 100 sleep, 700 Progress, Off msgbox, EasySurfer will now close. Please restart it to apply the update! ExitApp return F4:: Progress, b w200,, Checking for Updates..., Updating Progress, 100 sleep, 700 Progress, Off msgbox, EasySurfer will not be updated! FileDelete, update.txt GoTo AfterUpdate return } } ; End update section AfterUpdate: Gui, Font, S20 CDefault, Verdana Gui, Add, Text, x18 y2 w250 h30 , EasyHits4U Surfer Gui, Font, S8 CDefault, Verdana Gui, Add, Text, x102 y42 w40 h20 , Time: Gui, Add, DropDownList, vType x142 y39 w40 h70 , 15||20 Gui, Add, Button, x113 y120 w60 h30 , Surf! Gui, Add, Text, x4 y166 w50 h30 , F1=Help Gui, Add, CheckBox, vMute x100 y98 w100 h20 , Mute Sound? Gui, Add, Text, x90 y75 w50 h15 , Browser: Gui, Add, DropDownList, vBrowser x146 y72 w70 h100 , Firefox Gui, Show, x400 y188 h180 w291, EasyHits4U EasySurfer Return ButtonSurf!: Gui, Submit, NoHide if (Browser="") { msgbox, Don't forget to choose your browser! return } Gui, Destroy Answer=0 if (Mute=True) { Send {Volume_Mute} } if (Browser="Firefox") { if (Type=15) { Timer=15 Run, http://www.easyhits4u.com/surf.cgi?surftype=1 Loop { if (Timer>0) { Sleep 1000 Timer:=Timer-1 } else { if (Answer=1) { Send, {Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { if (Answer=2) { Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { if (Answer=3) { Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { msgbox, 64, Error, You never chose an answer to the captcha! Program will now terminate. HINT: Press F1 for usage instructions! ExitApp } } } Timer=15 } } } else { Timer=20 Run, http://www.easyhits4u.com/surf.cgi?surftype=2 Loop { if (Timer>0) { Sleep 1000 Timer:=Timer-1 } else { if (Answer=1) { Send, {Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { if (Answer=2) { Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { if (Answer=3) { Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter} Answer=0 } else { msgbox, 64, Error, You never chose an answer to the captcha! Program will now terminate. HINT: Press F1 for usage instructions! ExitApp } } } Timer=20 } } } } Return 1::Answer=1 2::Answer=2 3::Answer=3 Home::Send {Volume_Mute} F1::msgbox, 64, Help, NOTE: BEFORE USING THE EASYSURFER, YOU MUST BE LOGGED INTO EASYHITS4U! To use the EasySurfer, simply choose your surf type (15 second or 20 second) and hit "Surf!". When it is surfing, at any point before the timer is up, push either 1, 2, or 3 on your keyboard, depending on the answer to the captcha. By pushing 1, EasySurfer will click the first choice. By pushing 2, EasySurfer will click the second choice, and by pushing 3, EasySurfer will click the third choice! You can also choose to mute your computer's sound to avoid annoying ads that play music, etc. Muting/Unmuting can be done at any time while the script is running by pressing the Home key. GuiClose: ExitApp