False error indications in Notepad++

Get help with using AutoHotkey and its commands and hotkeys
AHKxx
Posts: 54
Joined: 26 Feb 2014, 01:37

False error indications in Notepad++

09 Sep 2015, 06:17

I have these simple hotkeys. They work. But when the last one is un-commented, even though the script still loads and the hotkeys work, all of the code that follows turns red in Notepad++, as though there is a error somewhere. I understand, more or less, why that is happening (there's an implicit open doublequote, or singlequote, somewhere, or something like that), yet the script itself loads works.

Is there any way to avoid the apparently false error, by somehow isolating or restructuring that last hotkey?

Thank you!

Code: Select all

^.:: Send {LEFT 1}.{RIGHT 1} ; add period
^,:: Send {LEFT 1},{RIGHT 1} ; add comma
^;:: Send {LEFT 1};{RIGHT 1} ; add semicolon
^space:: SEND {BackSpace 2}{Space} ; delete last character of prev word: 
;^':: Send {LEFT 1}"{RIGHT 1} ; add close quote

nli

Re: False error indications in Notepad++

09 Sep 2015, 07:05

Try ^':: Send {LEFT 1}"{RIGHT 1} ; "' add close quote by adding a closing ' " on the same line n++ will think the string ends properly
AHKxx
Posts: 54
Joined: 26 Feb 2014, 01:37

Re: False error indications in Notepad++

09 Sep 2015, 07:37

So then it was a Notepad++ glitch in how it was parsing the AHK code, even though the code itself was fine?

Interesting. Now after doing that, the

Code: Select all

"{RIGHT 1} ; " 
is in red. But I see those anomalies from time to time and they also seem to be peculiar to Notepad++, and not a problem with the script itself.

Thanks!
lexikos
Posts: 6367
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: False error indications in Notepad++

10 Sep 2015, 20:42

Notepad++ does not support AutoHotkey, and there are no third-party plugins or customizations that perfectly understand the AutoHotkey language either.

In particular, quote marks only have special meaning in expressions, but Notepad++ does not understand what is or isn't an expression.
AHKxx
Posts: 54
Joined: 26 Feb 2014, 01:37

Re: False error indications in Notepad++

03 Oct 2015, 12:32

Belated thanks for this explanation!

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 153 guests