Repeat command

Posted by Zendu on Mon 03 May 2004 10:23 PM — 9 posts, 29,186 views.

#0
Is there a way to repeat the 2nd to last command?
I send: Squint North
The game sends: You cant see that far at night
I send: Nightsight
Hopefully send: Squint North [oboisuly the direction changes, thus the need to repeat the 2nd to last direction]
Australia Forum Administrator #1
This alias will do it:


<aliases>
  <alias
   match="2nd"
   enabled="y"
   omit_from_command_history="y"
   send_to="12"
   sequence="100"
  >
  <send>cmds = GetCommandList (2)
If Not IsEmpty (cmds) Then
  If UBound (cmds) &gt;= 1 Then
    Send cmds (1)
  End If  ' more than one command
End If ' not empty </send>
  </alias>
</aliases>

#2
Thanks!
#3
As it turns out, since triggers dont display in the command list, how do you repeat the last command. sorry!!
*kneels*
USA #4
With a keypad macro? Ctrl + R
#5
What if i want a trigger to do cntrl r for me?
USA #6
I believe it would be something like that alias...

cmds = GetCommandList (2)
If Not IsEmpty (cmds) Then
  If UBound (cmds) &gt;= 1 Then
    Send cmds (1)
  End If 
End If 


I tried it out a few ways, but got errors. Give me a few more minutes to see if I can get it to work.
Australia Forum Administrator #7
In my post change:

Send cmds (1)

to

Send cmds (0)
#8
Ah i tried it as 2, thanks!