Autohotkey does not have any case
statements. What everyone does is to use if
and else
statements. (I know how it feels. I like case
, too)
A few tips for you:
- You can't have that
$
or a-
in your variable name in autohotkey - ...but you CAN have an underscore.
- You don't need to terminate your lines with a
;
.
Here is a translation into autohotkey for you.
gosub screenscrape
; here, all text on page is on clipboard
; variable "input" is a predefined portion of the clipboard
if(string1){ ;if the variable is not blank it will evaluate to `true`
gosub subroutine1
}else if(string2){
gosub subroutine2
}else{
msgbox not found
sleep 60000 ;milliseconds
}
Also, you can use real functions in autohotkey - you don't have to rely on gosubs. If you use gosubs, make sure you place a return
at the end of them. You should also read the autohotkey docs concerning the "auto execute" section.