Jump to content

Interactive syntax highlighter for AU3


ptrex
 Share

Recommended Posts

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.

I will give you the benefit of the doubt. Sorry people it's really hot where I am here in the library full of computers and no open windows. I tried to open them and was told off - No one go off topic now.
Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

OK, here is what I have done so far:

Added:

Func|EndFunc|If|Then|EndIf|For|Step|Next|While|WEnd|Switch|EndSwitch|Select|EndSelect|Do|Until|Retur

n|Global|Local|Dim|ReDim|Const|Case to the list of conditionals (I hope that is the name).

Exit|ReDim to the functions.

= to an operator (red) I hope that's right.

When you type "msgbox" (lowercase) and hit Tab codepress will now fill in the MsgBox function leaving the caret ready for the first parameter.

When you type "select" (lowercase) and hit Tab codepress will write out a Select statement.

When you type "cw" (lowercase) and hit Tab codepress will make an empty ConsoleWrite with the @CRLF.

Edited by JamesB
Link to comment
Share on other sites

Link to comment
Share on other sites

@Jamesb

I don't know where you are looking, but in the office site I don't see anything related to AU3.

The only way I can test is on my own server ?!

And without the modified files there is nothing to test.

regards

ptrex

Oh no, I mean I am testing it at college. I have a private storage space for this which let's me use PHP and MySQL :)

Like I said, I will upload the new version when I get home.

Link to comment
Share on other sites

So here it is, the current version I am working on.

Updates

CSS Conditional Statements Added

Conditional Statements added - I hope I added all of them

Quick snippets:

MsgBox: Type "msgbox" and press tab

ConsoleWrite: Type "cw" and press tab

Func: Type "func" and press tab

Select: Type "select" and press tab

Switch: Type "switch" and press tab

If: Type "if" and press tab

Posted Image autoit.zip (2.8K) Number of downloads: Posted Image

Should I add UDF functions as default or leave it as _+func name?

To-do:

Fix #include <> as the <> do not work

Add the compiler options

Add macro commands and not expand on the @ alone

Add more quick snippets

Add incasesensitivty. All functions are now not case sensitive.

Add include files. Doing so will allow variables with _'s to be highlighted correctly. - _Array done

If you can think of anything please tell me :)

Edited by JamesB
Link to comment
Share on other sites

Update: Version 2

New features:

All includes are now included!

Underscores and variables ($_MyVar) are now properly highlighted

Conditional statements should all have been added now

New snippets:

hks + tab = HotKeySet

toolt + tab = ToolTip

cwe + tab = ConsoleWriteError

Fixed:

Removed exit from functions

All functions, includes and conditional statements are not case sensitive!

To-Do:

Fix #include to allow <Include.au3> to be highlighted correctly

Add macros and not expand on any @

Add compiler directives

Add [] brackets - Now highlighted

Add expansion on < (Returns <>)

IMPORTANT: Previously Codepress would expand on any @. To save confusion I have completely removed @ highlighting until I can add all macros!

Posted Image autoit.zip (4.9K) Number of downloads: Posted Image

If I have missed anything not on the to-do list, _includes etc please tell me :)

Thank you,

James

Edited by JamesB
Link to comment
Share on other sites

@JamesB

The last version has lost the @ macro's syntax highlighting.

Also the COM properties need to light up in the same color as the Conditional Statements.

Example : $vbs.language -> language should light up in the different color.

These are also missing in the Conditional statements : Else|False|True|Default

For the rest a good job so far.

regards,

ptrex

Link to comment
Share on other sites

Link to comment
Share on other sites

@JamesB

Well the user could type @Myscrptidri and it would highlight breaking the script.

Not really, if yoy put the list of all macro terms in there. Like you did for all the functions.

Just a suggestion.

PS :

I juist uncommented the Macro statement in your file and added it back to where it was.

But this screws up the whole thing ? It does not add the CR at each line.

Any idea why ?

regards

ptrex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...