Scripting Support, Programmable triggers anyone? |
Scripting Support, Programmable triggers anyone? |
May 2 2003, 01:01 PM
Post
#1
|
|
Administrator Group: Admin Posts: 168 Joined: 2-May 03 From: New Hampshire Member No.: 1 |
A common user feature request has been to adding the ability to program a trigger. You know, with if-then statements and for loops, etc.
If you had to choose a language, what would it be? Why? |
|
|
Guest_Brennan Young_* |
Apr 4 2006, 12:36 PM
Post
#2
|
Guests |
PERL is an obvious choice, because of it's special strengths with text processing, but it's ugly.
Python and Applescript are both good choices too, although Applescript has quite poor string handling. HOWEVER, Applescript has a *very* neat thing called 'do shell script' which means that if you support Applescript, we can use whatever language we like - including C, just pass a string to whatever shell script, written in whatever language. Many Applescript folks just call grep, sed or PERL with 'do shell script' if they want to do any serious string crunching. Works very nicely. A basic scripting implemetation would need at least TWO input parameters: 1 String - the server output (trigger), or user input (macro) 2 A reference to the world where this is happening (name?, id?) The script should return true or false, indicating whether it handled the event or not. It should also be possible to send messages to the server, and/or write something into the input line ready to be sent. That's the bare minimum, but we can already do a lot with it. I would suggest looking at the scripting implementations of various irc clients, such as Snak, ircle, Xchat and so on. (Snak and Xchat both support more than one scripting language). Apart from tinyfugue, scripting MUDs on Mac is almost impossible. I'll buy Savitar in a trice if I could have this feature. |
|
|
Lo-Fi Version | Time is now: 26th November 2024 - 06:57 AM |