WinExist() is a function, and would need function syntax with parentheses and quotes for literal strings (see docs for examples). This would make sense with a regular If.
But you are checking the same anyway on the next line with the (deprecated) command IfWinExist. But the opening brace { shouldn't be on the same line; this (OTB style for code blocks) is only allowed for If statements with expressions.
Please also note that I moved your topic from AHK v2 help to v1 help since you posted AHK v1 code.
But you are checking the same anyway on the next line with the (deprecated) command IfWinExist. But the opening brace { shouldn't be on the same line; this (OTB style for code blocks) is only allowed for If statements with expressions.
Please also note that I moved your topic from AHK v2 help to v1 help since you posted AHK v1 code.
Statistics: Posted by gregster — 44 minutes ago