Quote:
Originally Posted by razer951
Been running ahk forever HS sux lol never been detected
Translated it into autoit and theres only 1 problem i dont know how to add an "if then"
|
Code:
If $VariableName=999 Then
Sleep(999999999999)
EndIf
The above code checks if the variable "VariableName" is equal to "999", if it is equal to "999" script execution will pause for 999999999999 Milliseconds.
You can also use the "Else" function so that if "$VariableName" is not equal to "999", script execution will follow a different path (Just inside of the "If" function, after using "EndIf" the script will follow it's normal path).
Code:
If $VariableName= 999 Then ;Determines whether the data in "$VariableName" is equivalent to "999", if it is then the code directly beneath this will be executed. If "$VariableName" is not equal to "999" then he code beneath "Else" wil be executed instead.
Sleep (999999999999) ;Pauses script execution for 999999999999 milliseconds.
[B]Else[/B] ;Executes the code beneath "Else", instead of the code below "Then" if $Variable name is not equivalent to "999".
Sleep (999) ;This will cause your script to Wait for 999 milliseconds before the next line of code is executed.
EndIf ;Ends the "If" function and continues with script execution.
The script above will check if "$VariableName" is equal to "999", if it is script execution will pause for 999999999999 Milliseconds (
Sleep (999999999999)) and then the "If" function will end. If "$VariableName" is not equal to "999" the script will pause for 999 milliseconds (
Sleep (999)), after the brief delay, the "If" check will end (
EndIf) and script execution will continue along the normal path.