Help with red quotation mark highlight

The popular SciTE-based AutoHotkey Script Editor
kenarsene27
Posts: 2
Joined: 26 Oct 2023, 03:34

Help with red quotation mark highlight

26 Oct 2023, 03:42

image.png
image.png (19.56 KiB) Viewed 645 times

Code: Select all

$e::{
var := "
(  
Enter
Encumber
Random
Random2
Shuffle
Play
No
Where
)"
CoordMode "Mouse"
var := Sort(var, "Random")
out := StrSplit(var,"`n","`r")
SendInput "{Click 1022 689}"
SendInput (out[1])
SendInput "{Enter}"
}
Whenever I press "e" I want it to automatically send one random word from that list.
My code works but how do I get rid of the red highlight after the first and 2nd quotation marks line 147 and 157? or is there a better code solution


[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
User avatar
boiler
Posts: 16978
Joined: 21 Dec 2014, 02:44

Re: Help with red quotation mark highlight

26 Oct 2023, 06:09

Your question about syntax highlighting is really about the editor and/or its AHK extension that you are using (not about AHK itself). Please identify what you are using so that this topic can be moved to the proper section with in the Editors sub-forum and so that the proper advice can be given. The answer is likely going to be to switch to an editor/extension that handles that case correctly in its implementation of syntax highlighting (if it is important enough for you to switch).
kenarsene27
Posts: 2
Joined: 26 Oct 2023, 03:34

Re: Help with red quotation mark highlight

26 Oct 2023, 07:01

boiler wrote:
26 Oct 2023, 06:09
Your question about syntax highlighting is really about the editor and/or its AHK extension that you are using (not about AHK itself). Please identify what you are using so that this topic can be moved to the proper section with in the Editors sub-forum and so that the proper advice can be given. The answer is likely going to be to switch to an editor/extension that handles that case correctly in its implementation of syntax highlighting (if it is important enough for you to switch).
I am using SciTE4AutoHotkey as recommended first by AHK


[Mod action: Moved topic from “AutoHotkey Help (v2)”.]
User avatar
boiler
Posts: 16978
Joined: 21 Dec 2014, 02:44

Re: Help with red quotation mark highlight

26 Oct 2023, 07:34

kenarsene27 wrote: I am using SciTE4AutoHotkey as recommended first by AHK
Note the other recommendation, which I use and also recommend:
Editors with AutoHotkey Support wrote:VS Code (plus extensions) provides an even higher level of support and a wider range of features, but can be heavy on resources.
I have never encountered an issue with the resource usage by VS Code.

This is how your code is rendered in VS Code using the AutoHotkey v2 Language Support extension by thqby:

VS Code syntax highlighting.png
VS Code syntax highlighting.png (14.19 KiB) Viewed 600 times

I don’t believe that fincs, the author of SciTE4AutoHotkey actively implements improvements, so I would not expect your issue to be addressed in an update. The AHK extensions for VS Code are actively updated by their authors, especially the v2 ones, as is VS Code itself by Microsoft.

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 83 guests