I was working on an answer to Is there a way to ping a Bluetooth device from Windows?.

And I was wondering why AutoIt syntax highlighting on Stack Exchange sites is so "poor".

I was searching for information, btw. I created a pull request to: https://github.com/highlightjs/highlight.js/blob/master/src/languages/autoit.js

But going to the issue...

First question: Answered here.

Using lang-autoit

Func _BluetoothFindFirstRadio(ByRef $phRadio)

Using lang-default

Func _BluetoothFindFirstRadio(ByRef $phRadio)

Why do func and _BluetoothFindFirstRadio and ByRef use the same color ?

IMHO, here in this case it should use different colors in syntax highlighting, but I do not know how or if this could be improved.

Feature Request Please add support for lang-autoit

Second question:

;~ https://www.autoitscript.com/forum/topic/140162-help-with-dllstruct-and-pointers/?tab=comments#comment-984341

Why is number 140162 colored as a number, and the next part of this line is colored differently, regardless of the fact that everything is in the comment line?

The same problem with comment line is in case of lang-vb like in the following exmaple:

` https://www.autoitscript.com/forum/topic/140162-help-with-dllstruct-and-pointers/?tab=comments#comment-984341

At Formatting Sandbox I put some effort for testing.

  • The canonical is What is syntax highlighting and how does it work? (contains the most detailed information). Feb 1, 2021 at 18:09
  • AutoIt is some dialect of BASIC. Is there a mapping from the AutoIt tag to some close relative, like VB.NET (lang-vbnet or lang-vb)? (A possible workaronnd could be lang-vb.) Feb 1, 2021 at 18:13
  • 1
    Do you have a reference for lang-autoit (that you used in the Super User question) being a valid identifier? Feb 1, 2021 at 18:15
  • according to What is syntax highlighting and how does it work? and: Supported Languages AutoIt is supported. AutoIt have similar syntax to VBA and VBS, but there are many differences. Feb 1, 2021 at 18:30
  • @P.Mort.-forgotClayShirky_q here is current version of lang-autoit used on SE sites. Feb 1, 2021 at 18:31
  • 3
    @MichałLipok We do not use all languages available in Highlight.js and do not have the AutoIt language loaded into our system at all. lang-autoit simply reverts to default and allows Highlight.js to guess at how to highlight.
    – animuson StaffMod
    Feb 1, 2021 at 18:54
  • A minute ago I edit my second question. An example for lang-vb was added. There is also problem with incorrect colors in comment line. Feb 1, 2021 at 18:55
  • @animuson according to your reqeust question was already edited, Feb 1, 2021 at 19:00
  • I reedit as I find that I must to specify directly lang-default. Now it looks like lang-autoit automaticaly reverts lang-default as you said. Feb 1, 2021 at 19:05
  • Could you add support for lang-autoit ? Feb 1, 2021 at 19:07
  • At Formatting Sandbox I put some effort for testing. Feb 1, 2021 at 19:27
  • As for Question1 I maked them as answered and at the same time I make a Feature Request Feb 4, 2021 at 21:13
  • As for Question2: How we can improve Highlighting ? Feb 4, 2021 at 21:14
  • Now I see How do I report a bug or request a new language? in this What is syntax highlighting and how does it work? Will follow that. Feb 4, 2021 at 21:30
  • @MichałLipok please do some research before writing such request. What are the (bandwith) costs of that language support and is that reasonable compared to the amount of questions that benefit from it.
    – Luuklag
    Feb 4, 2021 at 22:10


You must log in to answer this question.

Browse other questions tagged .