Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
24 user(s) are online (17 user(s) are browsing Forum)

Members: 1
Guests: 23

james007, more...

Browsing this Thread:   1 Anonymous Users



(1) 2 3 4 »


LUA syntax highlighting in Annotate 3, CRACKED IT

Joined:
2008/6/7 13:52
Group:
Member
Posts: 2050
Offline
Hi all

Last night I stayed up till 2am to create a syntax highlighting configuration in Annotate 3 and below is the XML to add to bottom of the "AnnotateSyntax.xml" file before the last tag. You can change the pen colours above the 200 value. It did look nice until a reboot when colours all changed.

I know we have Zune problems but this is bad news as AmigaOS always had default pallette that could be modified in the pallete or fullpalette applications.

Can somebody explain where Aros is going wrong or if I am missing the point. Note I use AmigaOS3.x (AmigaForever) and it is how I remember.

We really do need this so please let me know if I am missing something.

Also when I mentioned to developer on Annotate the comment was "well thats just Aros".

Sorry if I sound unhappy, but really tired this morning

http://www.imica.net/SitePortalPage.aspx?siteid=1&cfid=0&did=252

UPDATE

OK, thanks to help from Magorium, and his setpencolor app I have now a great working system.

Copy the file at the bottom of this post to your C: drawer.

http://aros-exec.org/modules/newbb/vi ... t_id=68146#forumpost68146

Then add the following to your startup sequence or do like I did and put in a seperate file and execute from startup-sequence.

c:setpencolor SCREEN="Workbench" PEN=4 COLOR=$4444EE >NIL:
c:setpencolor SCREEN="Workbench" PEN=5 COLOR=$33DD33 >NIL:
c:setpencolor SCREEN="Workbench" PEN=6 COLOR=$8899AA >NIL:
c:setpencolor SCREEN="Workbench" PEN=7 COLOR=$DD4400 >NIL:

Then reload the file from my site which I am about to update.

Posted on: 2012/5/9 0:17

Edited by clusteruk on 2012/5/9 0:39:15
Edited by clusteruk on 2012/5/9 0:40:07
Edited by clusteruk on 2012/5/9 14:52:02
Edited by clusteruk on 2012/5/9 14:52:50
_________________
Amiga 1000, 3000D and iMica Silent and NVidia version running latest Icaros.
http://www.imica.net
Please support the Amigas future, this year is 25th Anniversary lets make it special.
http://www.amiga25.org
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2010/1/8 10:07
Group:
Member
Posts: 1207
Offline
Talking about syntax highlighting and i wouldlove to see this on aros...

Attach file:



png  Pega2-ScribbleBeta01.png (227.39 KB)
1528_4faa1d9b16818.png 1024X768 px

Posted on: 2012/5/9 0:33
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2008/6/7 13:52
Group:
Member
Posts: 2050
Offline
@ serk118uk

If somebody fixes this issue then that is what my Annotate display looked like as long as background is set to white

So no need to move to MorphOS for this then.

Posted on: 2012/5/9 0:41
_________________
Amiga 1000, 3000D and iMica Silent and NVidia version running latest Icaros.
http://www.imica.net
Please support the Amigas future, this year is 25th Anniversary lets make it special.
http://www.amiga25.org
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 872
Offline
Could this be relevant to the issue? http://www.amiga.org/forums/showthread.php?t=52212

Posted on: 2012/5/9 3:28
_________________
Jyrki.J.Koivisto
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2008/6/7 13:52
Group:
Member
Posts: 2050
Offline
Quote:

DizzyOfCRN wrote:
Could this be relevant to the issue? http://www.amiga.org/forums/showthread.php?t=52212


Maybe, from my understanding, obviously we have a true colour display but I believe that wanderer would set a default set of 256 colours for normal system call. Now I could be wrong but I believe this is how the Amiga always worked and so do other platform by having a default palette. Obviously then you can use the palette tool to modify and programs can define there own palette.

However, I just want to understand why we cannot rely on a default system palette.

Posted on: 2012/5/9 3:49
_________________
Amiga 1000, 3000D and iMica Silent and NVidia version running latest Icaros.
http://www.imica.net
Please support the Amigas future, this year is 25th Anniversary lets make it special.
http://www.amiga25.org
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2950
Offline
@clusteruk:

About the annotate problem. I specificly tell annotate to open on it's own screen and use a script for that. In that script i also set the colors for this screen.

The colors are set with a little commandtool i wrote myself. If you want then i can give this to you, but i think it would be better if someone could translate it into c because the pascal version produces a 800k file , only to change some pencolor

btw: annotate 3 ??

regards,

Posted on: 2012/5/9 7:48
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2950
Offline
Annotate Colors Howto:

1) pick an icon place it somewhere appropiate and changed it't tooltype to iconx.

2) Create a script with the same name as the icon you've just placed. (with a big thanx to Bal000)

SYS:Prefs/PSI NameOfScreenYouWant OPEN >NIL:
Drive:drawer/ScriptTo_SetAnnColors >NIL:
CD Drive:drawer/Annotate >NIL:
Ann.AROS >NIL:
SYS:Prefs/PSI NameOfScreenYouWant CLOSE >NIL:

Don't forget to adjust the names i've used to your needs.

3) Create a script that you named ScriptTo_SetAnnColors and place it into correct drawer.
I used my pascal colorscheme here, but please go nuts as you like. But be aware this can also change other highlighting colors for other languages so that they look ugly instead. No problem as you can change the colors on the fly if you want. Just make another script that is more appropiate for the language or leave default pencolors alone.

;           Background color
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=200 COLOR=$00C00000 >NIL:   
;           
Plain Text Color
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=201 COLOR=$0000FFFF >NIL:   
;           
Programming language KeyWords
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=210 COLOR=$00FFFFFF >NIL:   
;           
Preprocessor
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=211 COLOR=$000000FF >NIL:
;           
Contant values that need distinction
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=215 COLOR=$00FF22EE >NIL:   
;           
Set Operators
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=222 COLOR=$0088FF88 >NIL:   
;           
Logical Operators
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=223 COLOR=$0088FF88 >NIL:   
;           
Relational Operators
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=220 COLOR=$0088FF88 >NIL:   
;           
Arithmatic Operators
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=221 COLOR=$0088FF88 >NIL:   
;           
Literal string
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=230 COLOR=$000f0fff >NIL:   
;           
Single Line Comment "//"
Drive:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=240 COLOR=$00C6C3C6 >NIL:   
;           
Multi Comment "{" "}"
Drive:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=241 COLOR=$00FF00FF >NIL:   
;           
Multi Comment "(*" "*)"
Drive:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=242 COLOR=$0000FF00 >NIL:   
;           
Possible comment color but not actually supported
Drive
:drawer/SetPenColor SCREEN="DEVSCREEN" PEN=243 COLOR=$00FFFF00 >NIL:

Ofcourse the Drive:drawer parts can be removed if SetPenColor is placed in a drawer that is on the path (such as the c-drawer). Also the screen name can be turned into a variable argument to make it more flexible.

4) Download the setpencolor commandline tool. Place it somewhere in the path or call it with location specified.

5) Change the pencolors in annotate (tools/config/appearance -> colors.
In the script i used i set the Background color to pen 200 and the textcolor to 201. so they have to be changed accordingly.

For some SetPenColor produces perhaps a little wierd output -> it was just a little test for me to see if i was able to write such a thing in the first place (arguments and all). When it worked i did not give it another though

Use SetPenColor ? to see it's arguments.
Most probably SetPenColor has some errors in it but the way i use it works ok for me.

Have Fun,

P.S. If there are any question left or have suggestions then please feel free to comment.

ED: added step 5 just in case someone uses a syntax-file which does not set background and text colors to match the ones from the script ?!.

Attach file:


zip setpencolor.zip Size: 228.25 KB; Hits: 83

Posted on: 2012/5/9 8:49

Edited by magorium on 2012/5/9 12:06:18
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2008/6/7 13:52
Group:
Member
Posts: 2050
Offline
@magorium

Quote:

btw: annotate 3 ??


Err, yes I am testing Annotate v3.

Quote:

About the annotate problem. I specificly tell annotate to open on it's own screen and use a script for that. In that script i also set the colors for this screen.


Again, Err, no it doesn't.

Actually I found the setting but it has problems on its own screen, anyway I run on Wanderer.

Anyway I will look at the script for ideas, many thanks.

However, it would still be better if Wanderer had colours on the pens that were available always unless the palette was changed.

Posted on: 2012/5/9 9:30
_________________
Amiga 1000, 3000D and iMica Silent and NVidia version running latest Icaros.
http://www.imica.net
Please support the Amigas future, this year is 25th Anniversary lets make it special.
http://www.amiga25.org
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2950
Offline
Quote:
Err, yes I am testing Annotate v3.

Cool. Can't wait , hopefully the syntax-bug i reported is removed.

Quote:
Again, Err, no it doesn't.

Using my solution.. it most definatly does it's job . Standard annotate has problems with the colors because, as you said, they tend to change on each startup of aros.

So therefore my workaround... And i also start annotate from wanderer. The only thing that changes is that a iconx-script is doing it's work in the background (as long as you don't let any of the scripts/command output something).

You can even change the colors when annotate is running -> it produces some nice color-effects in your annotate editor window when you scroll

Another convienency is that i can have my annotate-icon in the root of my dev-drive so i dont have to wander about

If you want to poc it, just run the setpencolor command and change one of the pencolors that is used in annotate, then scroll the window (with must have text in it that uses that pencolor) to see the effect I have a special syntaxfile that uses all colors so i could test it myself.

BTW: if you say annotate still has probs with the colors then i assume there is still no color-scheme editor in it ?

regards,

Posted on: 2012/5/9 9:42
Transfer the post to other applications Transfer


Re: LUA syntax highlighting in Annotate 3, held back by Pen colour problems

Joined:
2007/10/23 8:47
From Los Angeles,CA
Group:
Member
Posts: 770
Offline
@clusteruk

Some time ago i started one syntax higlighting for lua too, should be in the archives, ever tried that one?

[edit] never mind, if you needed to do this for annotate 3 means mine might not work....

Saimon69

Posted on: 2012/5/9 9:48
_________________
Kitteh Fav OS since 1995 =^x^=
---
Scarabocchi Binari - blog
Binary Doodles - english blog
Twitter
Transfer the post to other applications Transfer



(1) 2 3 4 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3651
2 nikolaos
nikolaos
3455
3 phoenixkonsole
phoenixkonsole
3011
4 magorium
magorium
2950
5 deadwood
deadwood
2331
6 mazze
mazze
2068
7 ncafferkey
ncafferkey
2052
8 clusteruk
clusteruk
2050
9 damocles
damocles
1769
10 Kalamatee
Kalamatee
1709
© 2004-2014 AROS Exec