Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Recalling text via command line?

Recalling text via command line?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Winddancer   (26 posts)  Bio
Date Sun 06 Nov 2022 05:33 PM (UTC)
Message
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.
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 06 Nov 2022 08:13 PM (UTC)

Amended on Wed 09 Nov 2022 05:16 AM (UTC) by Nick Gammon

Message
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

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Winddancer   (26 posts)  Bio
Date Reply #2 on Sun 06 Nov 2022 09:26 PM (UTC)
Message
Perfect! Thanks once again
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.


5,029 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.