Executing O/S commands and scripts from chat interface

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
rkathey
Giant
Posts: 116
Joined: Sun Feb 05, 2006 11:25 am
Location: Austin/Tx
Contact:

Executing O/S commands and scripts from chat interface

Post by rkathey »

I thought of something else. Let me know if it is too far out there:

/system

The ability to run an o/s command or script on the file system and display any output in the chat window. So you could create a .bat, .sh, .pl, .js or anything that had output (cgi-like) and redirect the output to the screen.

A possible scenario:

/alias showmon /system display_monster.sh {$1} ($2}
where display_monster spits out something like
/whisper DM Kobold AC 15, Reach 5, blah, blah blah

and invoked by
/showmon DM Kobold

display_monster.sh either reads a database or parses a file and returns the kobold data.

Another example
/alias rollsave /system RollCharacterSavingThrow.pl {$1} {$2}
/rollsave Demorious Fortitude 15

Where DEmorious is the character name, Fortitude is the type of saving throw, and 15 is the DC. The perl script (or java code or whatever) takes the three command line parameters and runs the command. It might spit out something like

Demorious rolls a 14 for a fortitude save but fails!

This is probably too far out there for most folks but the nice thing about executing an o/s command is that you could do things like launch web browsers, dicetool, character sheet tools whatever from a macro /alias.

This becomes even more powerful since the chat tool uses HTML.

Just a thought,
rAk
Meanwhile, back at the ranch, the RPTrolls are readying another attack of proposed functionality on the developers.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

I'm a little concerned about allowing the tools to execute any arbitrary code on the system. If scripts ever get sufficiently complex to start circulating, I'd rather not have to worry about a slashdot headline about MapTool being a facilitator for trojans, or some such :) (although the publicity would be great).

We've been discussing the possibility of dropping in a javascript engine that would be able to directly hook into the tool engine.

Perhaps we can find a middle ground.

Let's keep brainstorming.
Dreaming of a 1.3 release

Emryys
Dragon
Posts: 780
Joined: Tue Jan 31, 2006 9:01 pm
Location: Beneath the Aurora Borealis
Contact:

Post by Emryys »

trevor wrote:If scripts ever get sufficiently complex to start circulating, I'd rather not have to worry about a slashdot headline about MapTool being a facilitator for trojans, or some such :) (although the publicity would be great)
LOL :) I just had a picture of Danny Devito as the Lead Programmer...
Game On!
Image

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Ahhh ! Scary ! heh :)
Dreaming of a 1.3 release

Post Reply

Return to “MapTool”