Scripting tool?

Heffed

Member
Not exactly a script, but a scripting tool.

This is a quick and dirty .ash highlighter for the text editor ConTEXT.

If you use ConTEXT, just put the .chl file in your highlighters folder, and .ash commands will be highlighted with different colors in your scripts.

Edit: The screenshot is a bit munged. Obviously the text is smooth in the editor...
 

Attachments

  • KoL_ASH.chl
    3.2 KB · Views: 153
  • HighlighterScreenie.GIF
    HighlighterScreenie.GIF
    24.3 KB · Views: 535

ckb

Minion
Staff member
Here is another highlighter / syntax file for TextPad, based on Heffed's work.

Enjoy.

ckb
 

Attachments

  • KolMafia_ash.syn
    1.7 KB · Views: 120

cjswimmer

Member
Here is the ASH highlighting syntax for the UltraEdit text editor
Code:
/L10"KOLMafia ASH" Line Comment = // Strings = " DisableMLS File Extensions = ASH
/Delimiters = !@%^&*()-+=|/{}[\];" , .?
/Function String = "%[ ^t]++[a-z]+[ ^t]+^([A-Za-z_]+^)[ ^t]++(*)[~;]"
/Marker Characters = "[]"
/Indent Strings = "{" "else"
/Unindent Strings = "}" "else"
/C1"Keywords"
$class $effect $familiar $item $location $skill $stat $zodiac
boolean
class
effect else
familiar false float
if import int item
location
return
skill stat string
true
void
while
zodiac
/C2"Object References"
[]
/C3"ASH functions"
adventure add_item_condition
boolean_to_string bounty_hunter_wants buy
can_eat can_drink can_interact class_to_string cli_execute closet_amount council create
effect_to_string equip equip_familiar
familiar_to_string float_to_string
have_bartender have_chef have_effect have_skill
int_to_string item_amount item_to_string
location_to_string
mind_control museum_amount my_adventures my_basestat my_buffedstat my_class my_closetmeat my_familiar my_hp my_inebriety
my_level my_maxhp my_maxmp my_meat my_mp my_name my_zodiac
print put_closet put_shop put_stash
shop_amount skill_to_string stash_amount stat_to_string storage_amount
take_closet take_storage trade_bounty_hunter trade_hermit trade_trapper
unequip use use_skill
zodiac_to_string
/C4"Operators"
!
%
&&
*
+
-
// /
<
=
>
||
/C5"Separators"
(
)
,
;
{
}
 

bollwyvl

New member
does anyone use eclipse? it seems like an eclipse plugin for working with kolmafia would be ideal: a lot of the data entry work has already been done by the kolmafia team, and eclipse could use many of these values natively, providing advantages like autocompletion of the long item/skill/effect enumerations.

if anyone is interested, I will research this further, though I don't think my own interest would drive me to this.
 

Sprinky

New member
I use a program called Notepad2. It has quite a few Syntax highlighting schemes, though it does not have support for ASH scripting. I was wondering if someone possibly has the Syntax scheme for ASH scripting in Notepad2. I am going to try the one posted for UEdit, I'll see if that works.
 
I have updated the Ultra Edit wordfile addition but I've run into some error.  For some reason it is not properly highlighting my text.  It works sometimes but I can't figure out the problem.   This is an update for up to 8.8.   Can someone help me troubleshoot this?  Thank you.  P.S. I did not put all the properties in there because I am still in the process of learning to use them properly myself... I can put all of them in there, but that might be unnecessary.

( way too long to post inline - I made it into an attachment. -Daychilde :-D )

Thanks Daychilde :)

*UPDATE* Found my problem. Since I originally copy and pasted the syntax highlighting into notepad to use, it did not recognize the tab in the delimiter line. Replaced that and it all works great. Updated the file attached to this.
 

Attachments

  • ash_syntax.txt
    5.2 KB · Views: 107

Veloz

New member
<resurrecting old thread>

Just wanted to throw my favorite editor into the mix...

Araneae 5.0 [size=8pt][Download Here][/size]

It's free, loads incredibly fast, and has a nice feature set including syntax highlighting and shortcuts/code clips. I put together an ASH Extension Set and attached it below for your scripting enjoyment.

Just download the file from the link above, install, and put the three files from the .zip into the extensions folder.

I threw in a bunch of code clips that I thought were useful. If anyone can think of more clips that I need to add, I'll gladly update the extension set.
 

Attachments

  • A5_ASH.zip
    4.9 KB · Views: 89

kain

Member
I used to use UltraEdit all the time, but I take my Loathing/Mafia/scripts back and forth between work on a flashdrive, and UE doesn't play nice on it. So I'm currently using Notepad++ ... I gotta say, it's free and it's small and it's fast and I really like it.
 

Alomir

New member
Thanks very much for the UltraEdit work! My scripts look much prettier now (and easier to understand, of course).
 

darius180

Member
Wouldn't it be cool if it highlighted say skills, items, buffs, locations, etc in different colors? I think that would make things even easier to see, and probably catch errors (thank you cut and paste, for making me try to spend 25 adventures at the Hell Ramen. Thank you.)
 

dawdawdo

Member
[quote author=asturia link=topic=48.msg9338#msg9338 date=1224699984]
Sorry for posting in this very old topic, but can someone make this work in Notepad++?
[/quote]

Yes! : ). Just copy this file to C:\Documents and Settings\yourusername\Application Data\Notepad++\

I didn't use the previous work, instead I used every function listed in the current ASHRef, so I don't know how many are missing/obsolete. Feel free to modify and repost any improvements.
 

Attachments

  • userDefineLang.xml
    7.6 KB · Views: 75

zarqon

Well-known member
I've been using tsWebEditor, very tweakable and it handles lots of things really well. Just set it to parse ASH files as Java and other than $item/skill/etc[] it's on the ball.
 

asturia

Minion
[quote author=dawdawdo link=topic=48.msg9502#msg9502 date=1225598843]
Yes! : ). Just copy this file to C:\Documents and Settings\yourusername\Application Data\Notepad++\

I didn't use the previous work, instead I used every function listed in the current ASHRef, so I don't know how many are missing/obsolete. Feel free to modify and repost any improvements.
[/quote]

Thanks a lot for this!!!!
 
Top