How do you construct a script so that a given hotkey will result in variable processes depending on the currently active window?
Below is a basic template I wrote for doing the above. It follows the assumption that it will work down looking for an "IF" criteria to be met and when it is, execute the corresponding Process, at which point the script will end.
Is that correct or will the script continue looking for subsequent IFs? If yes, then how can I modify the script so that it will stop once an IF criteria is met?
Code: Select all
F1::
SetTitleMatchMode, 2
IfWinActive, Screen1
{
GoSub, Process1
}
IfWinActive, Screen2
{
GoSub, Process2
}
IfWinActive, Screen3
{
GoSub, Process3
}
Return