Code: Select all
MsgBox, "Hallo"
MsgBox,% "Hallo"
Switch
001: MsgBox,"Hallo"
002: MsgBox,"Hallo"
I miss the percentage sign that forces an expression in line 002.
Code: Select all
MsgBox, "Hallo"
MsgBox,% "Hallo"
Switch
It's the same error if the % is omitted. Switch wants the cases:Error: Missing "{"
Line#
001: MsgBox,"Hallo"
002: MsgBox,"Hallo"
---> 003: Switch
004: Exit
005: Exit
005: Exit
The program will exit.
https://www.autohotkey.com/docs/commands/Switch.htm wrote:Switch SwitchValue
{
Case CaseValue1:
Statements1
Case CaseValue2a, CaseValue2b:
Statements2
Default:
Statements3
}
Code: Select all
#NoEnv
ToolTip, "Hello"
ToolTip, % "Hello"
Var = % "Hello"
ListLines
Pause
Esc::
ExitApp
Users browsing this forum: No registered users and 37 guests