Jump to content



Photo

Interactive syntax highlighter for AU3


  • Please log in to reply
57 replies to this topic

#1 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 May 2008 - 09:17 AM

Interactive syntax highlighter for AU3

This is not a code example but rather a tool that some nice guy created, to have Interactive Code Highlighting on the web.

Called Codepress

Features :
  • Real-time syntax highlighting » just write some code
  • Code snippets » on AU3 example type “If” and press [tab]
  • Auto completion » simple type : msgbox
  • Shortcuts » on AU3 example press : cw
  • Multiple windows » you can add multiple CodePress windows to the page
Again like in many of my examples, I look for lightweight applications that fit well with AU3.
Benifit of this approach is that it is based on Java. Making it platform and Browser independend, opposed to other solutions around.

And this one is a nice one again, but still under construction.
I installed the highlighter on my machine on the LightTD webserver. Needs only 3 lines of code !!

001.jpg

I will let you all know more if, I have got some news on this topic.

As you can see more and more people are developing tools for AU3. It seems that it start to deserve it's place beside of the other big scripting names.

All credits for the AU3 language file goes to JamesB :)
He also has setup a test site : CodePress for AU3

Latest Syntax file :

Attached File  autoit.zip   5.34K   437 downloads

This far is how I am writing my own syntax Highlighter in AU3, using the Codepress concept.
It's not perfect yet, but close.

SyntaxHighlighter_in_AU3.jpg

Regards,

ptrex

Edited by ptrex, 14 September 2012 - 09:37 AM.








#2 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 01:24 PM

I made that :)

Well the syntax file at least.

Edit: I shall go back and update the file now.

Edited by JamesB, 09 May 2008 - 01:27 PM.


#3 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 May 2008 - 01:45 PM

@JamesB

Added AutoIt syntax highlighting. Thanks to James Brooks


Indead that's you :) nice job.

I add the button to run the Example code in the DEMO section.

Can you explain me how the syntax file is structured. So I can add the things too.
That saves me the time figuring it out.

Do you have it run on a server already.

Regards

ptrex

#4 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 01:49 PM

Actually, I found it quite hard to work it out at first so I studied the simple structures. I can't really explain how to use it because it varies as of such.

I just realised that the <> don't work so I will add them and any missing commands.

#5 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 May 2008 - 01:54 PM

@JamesB

OK.

So I leave it up to you then to continue.

When an update is released. Can you drop a message in here so we know.

thanks

regards

ptrex

#6 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 01:58 PM

So I leave it up to you then to continue.

Okey dokey.

When an update is released. Can you drop a message in here so we know.

Sure will.

Can anyone see things that dont work? I have added Dim :)

#7 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 May 2008 - 02:00 PM

@jamesb

I don't see the file ?

Maybe it's good to attach your beta version files here so we can test.

thanks

regards

ptrex

#8 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:02 PM

@jamesb

I don't see the file ?

Was there supposed to be one?

Maybe it's good to attach your beta version files here so we can test.

Will do, I am at college now using their system to test it on, so I will post it when I get home.

#9 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:07 PM

I will also add some snippets. Basically when you type something such as msgbox it will fix it and rewrite it as MsgBox(CARET STARTS HERE, "", ""). Any others you want?

Just noticed, conditional statements, while, if etc aren't done. I will add them.

Edited by JamesB, 09 May 2008 - 02:13 PM.


#10 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 May 2008 - 02:13 PM

@JamesB

Can anyone see things that dont work?


Things that don't work (yet).

The blue hightlights
Default, Dim, local, Func EndFunc, Do While, For Next, Return, ...


Darkbleu
Consolewrite, Msgbox


Regards

ptrex

#11 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:18 PM

Thanks, does anyone know the colour code for the blue highlights?

#12 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 09 May 2008 - 02:24 PM

Thanks, does anyone know the colour code for the blue highlights?

0x0000FF

Edit: For the Dark Blue;
I get 0x000090
using my color picker.

Edited by GEOSoft, 09 May 2008 - 02:28 PM.

GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#13 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:27 PM

Ahh thanks George. I wasn't sure if it would be the default blue.

#14 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 09 May 2008 - 02:28 PM

Ahh thanks George. I wasn't sure if it would be the default blue.

NP
Check my edit
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#15 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:34 PM

000090 is the dark blue.

#16 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 09 May 2008 - 02:37 PM

000090 is the dark blue.

:)
Want a copy of my color picker?
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#17 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:39 PM

I can't run it here :)

Honestly, 000099 is dark blue.

#18 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 09 May 2008 - 02:46 PM

I can't run it here :)

Honestly, 000099 is dark blue.

Make up your mind. In your previous post you agree with me that it's 000090 and now you claim it's 000099.
I still get 000090.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#19 James

James

    jbrooksuk

  • MVPs
  • 9,470 posts

Posted 09 May 2008 - 02:49 PM

But I needed light blue, which is 000FF. Dark blue is 000099.

#20 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 09 May 2008 - 02:53 PM

But I needed light blue, which is 000FF. Dark blue is 000099.

I gave you the standard blue to begin with, 0000FF, then added the Dark Blue because ptrex mentioned it as well.
That's enough for today. I'm outta here.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users