AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Forum to show autohotkey syntax for {code} tag

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
passport



Joined: 20 Mar 2005
Posts: 17

PostPosted: Mon Mar 21, 2005 5:16 pm    Post subject: Forum to show autohotkey syntax for {code} tag Reply with quote

This would be a Very Good Thing. It would be great to see colorful syntax for ahk scripts when we use the {code} tag.

Edit: I'm talking about the forum web page obviously.
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Mon Mar 21, 2005 5:41 pm    Post subject: Reply with quote

Also prehaps automatic linking to syntax and their respective documentation (e.g. MouseClick > MouseClick) unless you script a pure hotstring similar yourself Razz

I don't really think it's worth it though Neutral
_________________

Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Mon Mar 21, 2005 8:05 pm    Post subject: Reply with quote

This is a good wish and certainly something I'd like to see too. It's a little pie-in-the-sky, but maybe someone will come along someday who's knowledgeable enough in PHP scripting and with enough time on their hands to tackle something like this.

A couple have related topics have been mentioned before:
1) A script that transforms other scripts into colorized HTML for easier publishing on the web (I know this can be done with PSPad, but it would be nice to have a standalone script too).

2) Toralf's Syntax-Tidy for scripts (indentation and case correction)
Back to top
View user's profile Send private message Send e-mail
passport



Joined: 20 Mar 2005
Posts: 17

PostPosted: Tue Mar 22, 2005 5:27 pm    Post subject: Reply with quote

http://www.phpbb.com/phpBB/viewtopic.php?t=217723 looks promising.
Quote:
Syntax highlighting will allow users to use [syntax="language"]...[/syntax] to highlight code in just about any installed language, making for far more interesting posts than what boring [code] gives you.
I'll install a phpbb on my machine and test it out, play around, see if it's possible. It seems like the stock module doesn't support ahk syntax, for some reason.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Mar 22, 2005 10:45 pm    Post subject: Reply with quote

Cool. I'm glad someone's already laid the groundwork.

If you have any success, please post your findings here.
Back to top
View user's profile Send private message Send e-mail
passport



Joined: 20 Mar 2005
Posts: 17

PostPosted: Wed Mar 23, 2005 10:10 am    Post subject: Reply with quote

http://img224.exs.cx/img224/9296/screenshot5ow.png
http://img115.exs.cx/img115/271/screenshot24dn.png

After a couple of hours of fiddling around with it, I figured out how to do some basic highlighting in phpbb. Since authotkey syntax is strange, the default highlighter gives pretty much the same results I get with Editplus syntax highlighting for ahk.

Quote:
Also prehaps automatic linking to syntax and their respective documentation (e.g. MouseClick > MouseClick)

Yes, that is possible and quite easy.

The module installation didn't take too long. But I tested the mod on a fresh phpbb installation.

Usage is nice.
[syntax="ahk"]ahkcode[/syntax]

What do you think?
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 23, 2005 4:16 pm    Post subject: Reply with quote

Looks very nice. I think this would be a great module to implement in this forum.
Back to top
View user's profile Send private message
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Wed Mar 23, 2005 5:04 pm    Post subject: Reply with quote

If this gets implemented I'd like an option in Profile to turn off syntax highlighting as I prefer it without.
_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 23, 2005 5:47 pm    Post subject: Reply with quote

It looks like it would be an entirely new tag, and that the old code tag would still work the same.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Mar 23, 2005 9:32 pm    Post subject: Reply with quote

passport wrote:
After a couple of hours of fiddling around with it, I figured out how to do some basic highlighting in phpbb.
Thanks for your research and screenshots.

Quote:
Since AutoHotkey syntax is strange, the default highlighter gives pretty much the same results I get with Editplus syntax highlighting for ahk.
Yeah that's a drawback. The syntax is indeed strange from a programmer's point of view.

If you're willing to put even more effort into it, such as including all keywords and perhaps even making an script that automatically regenerates the syntax coloring module from the master syntax files in the Extras folder, that would be a boon.

When you're ready, I'd be grateful if you could send your work and some basic set-up instructions to support@autohotkey.com ... (at your leisure, since this is a low priority).

Thanks.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group