Gammon Forum
Entire forum
MUSHclient
General
scripting additions to input line
scripting additions to input line
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Tspivey
Canada (54 posts) bio
|
Date
| Sun 21 Aug 2005 06:53 PM (UTC) |
Message
| How can I add things to the input line with a script, bound to an accelerator key?
This is something that seems useful, coming from a tinyfugue backgroundd.
e.g. I could hit keypad +, and it would send open to the input line,
then hit 8, and it would send north and send the command "open north". | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #1 on Sun 21 Aug 2005 08:42 PM (UTC) |
Message
| "send to the input line" meaning, make it appear in the command window? (where you can append it, or hit enter and it sends, right?)
You'll use the function SetCommand, it send things to the command window (or sendto command, if youre in a trigger/alias/whatever and don't want to sendto script).
For the appending part, you'll need to do a little scripting, SetCommand will not overwrite something thats already in the command window, so what you could do is try and set always (for speed) and if it returns eCommandNotEmpty (it returns an integer, you can check in your constants file), and then if that is the case, get the stuff from the command window (GetCommand), clear it (Uh, with PushCommand, I guess, since I can't find anything to clear the command window, Nick, we need a ClearCommand), and then re-set it (after changing the string with whatever new thing you want).
And then you'd have to hit enter. Unless you want it to magically know when to send, and when to not send. Which is doable, but you'll probably just want to use send (or sendnopush). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,010 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.