|
Scripting function for last typed command
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
ProgrammingVerbs
(3 posts) bio
|
| Date |
Sun 23 Mar 2003 09:47 PM (UTC) [ quote
] |
| Message |
I looked through the functions, and was unable to find a function that got the last command entered.
It is an attempt to automate opening doors.
dim DirectLastMoved
dim PortalType
Sub Portal_Auto_Open(TriggerName,TriggerLine,arrWildCards)
World.SetVariable "PortalType", arrWildCards(1)
World.SetVariable "DirectLastMoved", (here is the command last typed)
World.Send("unlock" & World.GetVariable("PortalType") & World.Send("DirectLastMoved")
World.Send("open" & World.GetVariable("PortalType") & World.Send("DirectLastMoved")
End Sub
Trigger: The * appears to be closed.
Send: %0
so as you see, if there is a function where I can retrieve that, info, it would make it possible to open the door (or whatever portal type it is (gate, grate, trapdoor, etc.))
thanks in advance. | top |
|
| Posted by |
Nick Gammon
Australia (15,394 posts) bio
|
| Date |
Sun 23 Mar 2003 10:56 PM (UTC) [ quote
] Amended on Sun 23 Mar 2003 10:57 PM (UTC) by Nick Gammon
|
| Message |
| See GetCommandList - on that page is an example of getting the last command:
world.getcommandlist (1) (0)
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
1,022 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )