Okay, Im making a program that will press the 5 #s that i type into the 5 input boxes over and over again until i stop the script. here is what i have so far :
#SingleInstance
Global $Paused
HotKeySet ("{PAUSE}", "TogglePause")
TrayTip("Auto Powers", "Please turn off ANY auto power that you have (Hasten, AM, etc..)", 5, 1)
Sleep (10000)
If FileExists ( @WORKINGDIR & 'Auto Fire.ini' ) Then
$varkeyname1 = IniRead ( "Auto Fire.ini" "keys" "key1" "" )
$varkeyname2 = IniRead ( "Auto Fire.ini" "keys" "key2" "" )
$varkeyname3 = IniRead ( "Auto Fire.ini" "keys" "key3" "" )
$varkeyname4 = IniRead ( "Auto Fire.ini" "keys" "key4" "" )
$varkeyname5 = IniRead ( "Auto Fire.ini" "keys" "key5" "" )
ElseIf Not FileExists ( @WORKINGDIR & 'Auto Fire.ini' ) Then
TrayTip("Note About Entering Powers", "Please use the CORRECT key or else it will not work!", 5, 1)
Sleep (10000)
$varkeyname1 = InputBox ( "Auto Power 1", "Input key # for auto power #1." )
$varkeyname2 = InputBox ( "Auto Power 2", "Input key # for auto power #2." )
$varkeyname3 = InputBox ( "Auto Power 3", "Input key # for auto power #3." )
$varkeyname4 = InputBox ( "Auto Power 4", "Input key # for auto power #4." )
$varkeyname5 = InputBox ( "Auto Power 5", "Input key # for auto power #5." )
IniWrite("Auto Fire.ini", "keys", "key1", "" & $varkeyname1)
IniWrite("Auto Fire.ini", "keys", "key2", "" & $varkeyname2)
IniWrite("Auto Fire.ini", "keys", "key3", "" & $varkeyname3)
IniWrite("Auto Fire.ini", "keys", "key4", "" & $varkeyname4)
IniWrite("Auto Fire.ini", "keys", "key5", "" & $varkeyname5)
EndIf
TrayTip("Pausing Auto Fire", "Use the Pause / Break button located over the page up button to pause this script. Then use the Windows Task Manager to close the process AutoIt3.exe", 5, 1)
Sleep(10000)
ProgressOn("Loading", "Auto Fire is now loading...")
For $m = 10 to 0 step -1
For $i = 100 to 0 step -100
ProgressSet($i, $m & " seconds until loading is complete." & @LF & @LF & "Please be patient.")
sleep(592);close to making 100 to 0 = 60 seconds when counting down.
Next
Next
ProgressSet(0 , "You Have 10 seconds to get back in CoH!", "WARNING!")
sleep(2000)
ProgressOff()
sleep(10000)
$1 = 1
While $1 = 1
Do
Send ("" & $varkeyname1)
Sleep (1000)
Send ("" & $varkeyname2)
Sleep (1000)
Send ("" & $varkeyname3)
Sleep (1000)
Send ("" & $varkeyname4)
Sleep (1000)
Send ("" & $varkeyname5)
Sleep (1000)
Until $1 = 10
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
Only problem is that when I compile and run it, it ignores the If FileExists part, and does BOTH things, not just the one that i want it to do if there is an INI. All it needs to do, is recognize if there is an ini file, if not ask the 5 questions, then save them to an ini, and next time it's run, the ini is there so that you do not have to create it again. PLEASE HELP ME, im pulling out my hair in frustration...
Thanks,
cohaholic