When I run this:
Code: Select all
IfMsgBox, OK {
Var := 0
Send, %Retrieved%
return
}
return
But when I run:
Code: Select all
IfMsgBox, OK
Var := 0
There was no #warn either.
Code: Select all
IfMsgBox, OK {
Var := 0
Send, %Retrieved%
return
}
return
Code: Select all
IfMsgBox, OK
Var := 0
Code: Select all
IfMsgBox, OK
{
Var := 0
Send, %Retrieved%
return
}
return
Code: Select all
Function(){
; -- Something
}
Thanks gregster!gregster wrote:The opening { on the same line is only allowed with if in expression syntax, for example if(x = 2) { ... so, put in on the next line.
Makes sense thanks!Cuadrix wrote:IfMsgBox is a command, which means that you can't use {}-brackets in the same line as the command. Instead, place the {}-brackets under the command, like this:You can use {}-brackets in the same line as functions; Ex:Code: Select all
IfMsgBox, OK { Var := 0 Send, %Retrieved% return } return
Code: Select all
Function(){ ; -- Something }
Users browsing this forum: labrint and 90 guests