Title says it all.
I'm getting this error:
I don't know why it says this, and if I remove the delimiter, it will work like normal again. I don't think I understand.
Yes I have read the docs, but nothing comes up about being picky for delimiters.
Single Instance directive not allowing delimiters Topic is solved
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Single Instance directive not allowing delimiters
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Re: Single Instance directive not allowing delimiters
It is documented without the comma. Usually it doesn't work to insert characters and not create a bug. I guess it's easier in AHK than in Python though. Likely the comma was remove to be consistent with the command-style syntax.
try it and see
...
...
Re: Single Instance directive not allowing delimiters Topic is solved
see these docs:Delta Pythagorean wrote:Yes I have read the docs, but nothing comes up about being picky for delimiters.
andhttps://autohotkey.com/v2/v2-changes.htm wrote: Removed "command syntax". That is, a "command" is now just a function or method call without parentheses (at the start of a line). That means:
All former commands are now functions (excluding control flow statements).
All functions can be called without parentheses.
All parameters are expressions or output variables, so all text is "quoted".
Parameters are the same regardless of parentheses; i.e. there is no output variable for the return value, so it is discarded if parentheses are omitted.
Normal variable references are never enclosed in percent signs. Use concatenation or format() to include variables in text.
There is no comma between the function name and parameters, so MouseGetPos(, y) = MouseGetPos , y (x is omitted). A space or tab is required for clarity. For consistency, directives also follow the new convention (there must not be a comma between the directive name and parameter).
There is no percent-space prefix to force an expression.
Commands which previously accepted an "input variable" now also accept other expressions.
Method calls are restricted to a plain variable followed by one or more identifiers separated by dots, such as MyVar.MyProperty.MyMethod "String to pass".
this change happened in v2-a079:https://lexikos.github.io/v2/docs/Functions.htm#intro wrote:
Also, a function may be called without storing its return value:Code: Select all
Add(2, 3) Add 2, 3 ; Parentheses can be omitted if used at the start of a line.
"command" syntax now looks like this in AHK v2:https://autohotkey.com/boards/viewtopic.php?p=153136#p153136 wrote: v2.0-a079-be5df98
Removed legacy command syntax and %expression% substitution in strings.
That is, a "command" is now just a function or method call which sits at the start of the line, lacks parentheses and discards its return value. Aside from parentheses, commands and functions now share the same syntax.
Code: Select all
MsgBox "hello world" ; no comma allowed, and all params are expressions, so literal text must be quoted
https://autohotkey.com/boards/viewtopic ... 37&t=39469
https://autohotkey.com/boards/viewtopic ... 37&t=31139
Re: Single Instance directive not allowing delimiters
A preprocessor directive is not a command - at least I wouldn't assume an automatic connection between those 2.
My suggestion is it to either clarify the helpfile or allow the leading , for directives.
My suggestion is it to either clarify the helpfile or allow the leading , for directives.
Recommends AHK Studio
Re: Single Instance directive not allowing delimiters
well the quote from v2 changes does specifically mention that it applies to directivesnnnik wrote:A preprocessor directive is not a command - at least I wouldn't assume an automatic connection between those 2.
My suggestion is it to either clarify the helpfile or allow the leading , for directives.
and the SingleInstance help page itself has no comma:
https://lexikos.github.io/v2/docs/comma ... stance.htm
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Single Instance directive not allowing delimiters
Thanks for the help and guides, I appreciate it.
This is gonna take some getting used to
This is gonna take some getting used to
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Who is online
Users browsing this forum: jellopudding, WarlordAkamu67 and 40 guests