|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Sat Mar 18, 2023 5:50 pm
Sending arbitrary multiple line text to a trigger to parse for script testing? |
Is there a way to input text via command line or text file that CMUD will parse as if it were text from a MUD? This is to allow offline testing or testing triggers against arbitrary text - for instance, against sample text provided in help requests on this forum. Bonus points if this arbitrary input can simulate gmcp data packets.
Mike |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Fri Mar 24, 2023 4:21 pm |
#RAISE anEvent?
It can both #ECHO something to the screen (to be parsed) and update variable values for testing. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Fri Mar 24, 2023 9:10 pm |
I was not aware that a trigger would parse/fire on #echo (I thought the only parsing done was that CMUD would expand variables, but not that they would be checked against triggers). That will make it easier if I can type in #echo commands to an event as you suggest, and send it with a simple command to raise the event. As CMUD is multi-threaded can the triggers fire on individual lines (or series of lines) sent via a single script? Also, I have to admit I was trying to figure out a script for ekhart's request, but you have been busy and posted a script for that as well.
Mike |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Tue Mar 28, 2023 1:55 pm |
#ECHO and #SAY both cause triggers to fire, #PRINT does not.
It should. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Tue Mar 28, 2023 2:21 pm |
Thanks for the info. This should allow any user to simulate any mud text output that they desire for the purpose of writing/testing triggers.
Mike |
|
|
|
|
|