AutoHotkey Community

It is currently May 27th, 2012, 9:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: July 5th, 2006, 2:51 pm 
Offline

Joined: April 19th, 2006, 1:02 pm
Posts: 386
So i was fed up with having to look up every command/function/buildinvar in the helpfile just to see what the params are or what the actuall name of the command/var is. Thats why i created a codetemplatefile for ConText wich has all the commands functions and build-in variables in it. The codetemplate feature from context is great. Just type a string or even a single char(you can also highlight them or just put the caret behind it) and hit Ctrl + J or hit Ctrl + J and then type the string. What you get is this:
Click for bigger picture
Image

**Update
05.11.2006
- Fixed a typo which prevented the codetemplate from being installed if it allready existed.

Here is the script
*NOTE:The template file has to have the same name as the displayname for your highlighter. In case you want to use an other highlighter you need to rename the AutoHotkey.ctpl accordingly.

Hope you like it.


Last edited by foom on November 5th, 2006, 7:21 pm, edited 6 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2006, 12:32 am 
Offline

Joined: February 13th, 2006, 10:40 pm
Posts: 389
Location: Utah
Wow! Nice job!

I saw that cool picture so i decided to try out ConTEXT and now im converted. I like that it launches the help for me when i press F1 and i can configure it to run scripts when i press F9.

I like your work at the highlighting, but i think you might have included to many things. the words "and" and "all" and "count" get highlighted often in things like

Code:
msgbox, Now minimizing all apps, and closing %count% IE windows


Also i think ill change mine to highlight %var% instead of "string" although it is handy to be able to differenciate when you have things like:

SysInfo v 3.0 by Veovis wrote:
Gui %i%: add, pic, % "vBack" i " h"ref(b "H")" w"ref(b "W") ,% CreateBMPGradient("resource/" i "Back.bmp",barbackcolor2,barbackcolor1,1)
Gui %i%: add, pic, % "xp yp vBar" i " h"ref(b "H")" w"ref(b "W") ,% CreateBMPGradient("resource/" i "bar.bmp",ref(b "color_2"),ref(b "color_1"),1)

_________________
Image
"Power can be given overnight, but responsibility must be taught. Long years go into its making."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2006, 3:12 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
When/if you ever want this distributed with AutoHotkey, please let me know. However, if you want that, it would save me time if you could make a generator script that builds a new syntax file based on the standard syntax lists distributed with AutoHotkey (there are some example scripts in the Extras folder that show how to do it). Even better would be to have a simple installer script that generates the new syntax file on-the-fly, but that would be more work.

Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2006, 1:41 pm 
Offline

Joined: April 19th, 2006, 1:02 pm
Posts: 386
Sorry for not replying for such a long time. Right after i postet this, lightning grilled my dsl-modem and router :/ and i had to take a time off from the web.

Veovis wrote:
...I like your work at the highlighting, but i think you might have included to many things. the words "and" and "all" and "count" get highlighted often in things like..


Thats because ConTEXT highlighter are very basic. Words are highlighted on a simple match and not on regexp rules. I hope in ConTEXT v.1 i'll be able to define regexp based rules so that this highlighting quirks will be gone.

Chris wrote:
When/if you ever want this distributed with AutoHotkey, please let me know. However, if you want that, it would save me time if you could make a generator script that builds a new syntax file based on the standard syntax lists distributed with AutoHotkey (there are some example scripts in the Extras folder that show how to do it). Even better would be to have a simple installer script that generates the new syntax file on-the-fly, but that would be more work.


I reworked the script which i used to create the templates and added code to create the highlighter and install it too(see first post). Feel free to distribute it with AHK if you like.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2006, 3:10 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the updated script, which be much easier for me to maintain. I'll review it and try to include it in the next release.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2006, 11:06 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I've made some basic improvements and adjustments to the script, which have been tested with the latest version of ConTEXT. Here's the new version: http://www.autohotkey.com/misc/AHK_for_ConTEXT.ahk

Please let me know if the changes are acceptable to you (and of course, feel free to make any other changes, such as crediting yourself if you wish).

If anyone gets a chance to try it, please let me know if you have any problems with it.

Thanks again.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2006, 9:57 pm 
Offline

Joined: April 19th, 2006, 1:02 pm
Posts: 386
I added some credits and have nothing to say about the changes beside that the contextdir selection could stay in an could be used if contextpath is not found. I changed the link in my initial post. You can get the file from there.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2006, 3:15 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
foom wrote:
I added some credits and have nothing to say about the changes beside that the contextdir selection could stay in an could be used if contextpath is not found.

Thank you. I will distribute your version with the next release of AutoHotkey.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher, nomissenrojb, SKAN, Stigg, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group