Scripting function for last typed command

Posted by ProgrammingVerbs on Sun 23 Mar 2003 09:47 PM — 2 posts, 13,077 views.

#0
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.
Australia Forum Administrator #1
See GetCommandList - on that page is an example of getting the last command:

world.getcommandlist (1) (0)