Recalling text via command line?

Posted by Winddancer on Sun 06 Nov 2022 05:33 PM — 3 posts, 10,963 views.

#0
I found the nice recall text functionality in the Display menu.
Is there a way to
a) call the recall functionality along with options via commandline
b) have the output of the recall search be displayed inside the active world window?

Reason being is that my mud produces messages when you improve a skill in the format of "*** You improved your 'xxx' skill ***"
And I like to occasionally check which skills improved within a given time. When I use the entry from the Display menu or call it directly via its shortcut, ctrl-u, I get the info displayed in a separate window from which I have to choose my world window to continue mudding.
Australia Forum Administrator #1
Add this alias:


<aliases>
  <alias
   match="recall *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

local matchWanted = string.lower ("%1")
if matchWanted == '' then
  print "No text to recall given"
  return
end -- if

for line = 1, GetLinesInBufferCount () do
  local lineText = GetLineInfo (line, 1)
  -- do a simple (non regexp) find
  if string.find (lineText:lower (), matchWanted, 1, true) 
     and not GetLineInfo (line, 4)   -- not a Note
     and not GetLineInfo (line, 5)   -- not player input
  then
    ColourNote ("gray", "", lineText)
  end
end
</send>
  </alias>
</aliases>



Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


Then type: recall improved your
Amended on Wed 09 Nov 2022 05:16 AM by Nick Gammon
#2
Perfect! Thanks once again