#include <File.au3>
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)
Opt("TrayIconHide", 0)
;create the tray menu items
TrayCreateItem("Start Action (F1)")
TrayItemSetOnEvent(-1, "Start")
TrayCreateItem("Stop Action (F2)")
TrayItemSetOnEvent(-1, "Stop")
TrayCreateItem("Set Sleep Interval (F3)")
TrayItemSetOnEvent(-1, "Interval")
TrayCreateItem("Pause Action (F2)")
TrayItemSetOnEvent(-1, "Pause")
TrayCreateItem("Exit (Escape)")
TrayItemSetOnEvent(-1, "Terminate")
;Set global variables
Global $Paused = False
Global $sleep = 0
Global $stop = False
;Set the hotkeys
HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{F3}", "Interval")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
while 1
sleep(100)
wend
Func Start()
If ProcessExists("IMVUClient.exe") OR ("IMVUQualityAgent.exe") Then
Opt("WinTitleMatchMode", 4)
;Get the Window Handle for IMVU
$hICWindow = WinGetHandle("[CLASS:ImvuNativeWindow]")
;Bring IMVU to the front so we don't accidently type into something else
WinActivate($hICWindow)
WinWait($hICWindow)
If $stop = True Then
$stop = False
EndIf
while $paused = False AND $stop = False
If $paused = True Then
;Pause the script for 24 days
sleep(2147483647)
EndIf
;Type the action code
Send("*msg TwoPartyAction:/footstomp 2 (YOUR CID HERE) 2 (ENTER TARGETS CID HERE and remove the parentheses)")
;Hit enter to submit it
Send("{ENTER}")
;Pause for x amount of seconds
Sleep($sleep)
wend
EndIf
EndFunc
Func Stop()
If $stop = False Then
$stop = True
EndIF
EndFunc
Func Interval()
;Create a dialog box for sleep time input
$sleep = InputBox("Capture Interval", "Please Type In The Amount Of Time To Wait Inbetween Taking Pictures")
$sleep = $sleep * 1000
EndFunc
Func TogglePause()
If $Paused = True Then
$Paused = False
TrayTip("Resumed", "Script Resumed", 5)
Else
$Paused = True
TrayTip("Paused", "Script Paused", 5)
Endif
While $Paused = True
Sleep(100)
WEnd
EndFunc
Func Terminate()
Exit 0
EndFunc