Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Bug in Notepad++ syntax highlighting


  • Please log in to reply
7 replies to this topic
nigelle
  • Members
  • 129 posts
  • Last active: Dec 28 2013 04:31 PM
  • Joined: 26 Sep 2008
Many keywords are not detected (and coloured) if they are just followed with a comma "," without a space e.g. :
"MsgBox This is the 1-parameter method. Commas (,) do not need to be escaped." : MsgBox is detected.
"MsgBox, 4, , This is the 3-parameter method. Commas (,) do not need to be escaped." : MsgBox is not detected....

I have discovered Notepad++ syntax highlighting in :
<!-- m -->http://www.autohotke...topic19404.html<!-- m -->

[Moved from Bug Reports forum. ~jaco0646]

Vifon
  • Members
  • 47 posts
  • Last active: Aug 29 2011 06:33 PM
  • Joined: 22 Feb 2009
Just add comma to the operators. You can do it by clicking on icon with a small lightning, to the left of the macros.

nigelle
  • Members
  • 129 posts
  • Last active: Dec 28 2013 04:31 PM
  • Joined: 26 Sep 2008
Long range :
As the syntax is distributed with AutoHotkey it should be corrected by AutoHotkey team. See : ...\AHotKey\Extras\Editors\Notepad++\Run this to install syntax file for Notepad++.ahk

Short range :
Thanks for your patch, I have found the "icon with a small lightning", I have tried some actions but my only result was to colour in red the whole text !
Please explain what I have to do...

Vifon
  • Members
  • 47 posts
  • Last active: Aug 29 2011 06:33 PM
  • Joined: 22 Feb 2009
Sorry for previous unclear post.
Click mentioned before icon. In new window there should be a dropdown list next to the "User language" words. Choose there "AHK AutoHotkey", then go to the "Operators" tab and move comma from left list to right.

nigelle
  • Members
  • 129 posts
  • Last active: Dec 28 2013 04:31 PM
  • Joined: 26 Sep 2008
Fine : now it works !
Many thanks for your help.

Gertlex
  • Members
  • 39 posts
  • Last active: Apr 26 2011 11:38 PM
  • Joined: 29 Oct 2006
Another one... (I choose this thread since it's fairly new)

It expects pairs of %s. E.g.
...
MsgBox, % 5000 * 200 + Sum ;
return
}
Which tells Msgbox to evaluate subsequent stuff as an expression...
(ignore the ;, forgot to delete it when i took the screenshot)

But looks like this:
Posted Image

I can hotfix it with a ;% at the end of each line like that.

Any better approaches? I tried playing around with the settings reached by the lightning bolt button, to no avail.

Vifon
  • Members
  • 47 posts
  • Last active: Aug 29 2011 06:33 PM
  • Joined: 22 Feb 2009
It can be fixed by disabling Delimiter 1 in the forth tab and modifying the second tab like this:
Posted Image
Of course it can be in group other than 3th (just the empty one).

Gertlex
  • Members
  • 39 posts
  • Last active: Apr 26 2011 11:38 PM
  • Joined: 29 Oct 2006
Cool, thanks.