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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Lua ➜ Sending a newline or pressing enter key.

Sending a newline or pressing enter key.

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


Posted by Wuggly   USA  (112 posts)  Bio
Date Sat 06 Feb 2016 12:34 AM (UTC)

Amended on Sat 06 Feb 2016 05:39 AM (UTC) by Wuggly

Message
Hello again,
I have a trigger that sends a colournote.

ColourNote ("green", "", "Equipment Stats Successfully Updated")


However the note won't show until after you press enter in-game after the match.

Is there any way to force it to show the note after the trigger match without having to press enter?

Like how the "Test Trigger..." thing works, where you can press ctrl+enter to make a blank line under the trigger so you can see if the trigger responded.

I tried adding \n into the colournote, but again it wouldn't work until after you press enter.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 06 Feb 2016 08:32 AM (UTC)
Message
Template:version Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.

- Nick Gammon

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

Posted by Wuggly   USA  (112 posts)  Bio
Date Reply #2 on Sat 06 Feb 2016 10:42 AM (UTC)
Message
Using version 4.94

This is part of the script from my other post that you helped me greatly with (putting stats into a table and pulling them out).

It's not a big issue, it would just make it more... efficient. Instead of having it stop reading their equipment stats by a DoAfter timer, I have it set now to stop reading as soon as it sees the first prompt line after it lists the equipment (that's where the colournote comes in, so they know for sure the stats it collected that are in the miniwindow are accurate and updated), this way lag won't be an issue that could mess it up.


Thank you for being so noob friendly.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 06 Feb 2016 08:51 PM (UTC)
Message
Quote:

However the note won't show until after you press enter in-game after the match.


It's probably because of recent changes that defer notes if you are in the middle of a prompt line. If you make your MUD prompt end with a newline the problem should go away.

- Nick Gammon

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

Posted by Wuggly   USA  (112 posts)  Bio
Date Reply #4 on Sat 06 Feb 2016 10:02 PM (UTC)
Message
I did manage to get the script that forces a newline after the prompt to work, however it didn't help with the colournote, still had to press enter to see it.

http://mushclient.com/forum/?id=7430
(reason I couldn't get it to force a newline before was because of the arrows in it. I replaced with \< and \> and it worked)

I did email devs awhile ago about it(newline after prompt), and they responded saying it is supposed to go on the same line as the prompt, so I highly doubt I can convince them to change that.


I suppose I'll just have to go back to using timers.

Thanks for the response.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 07 Feb 2016 08:45 AM (UTC)
Message
See the FAQ - there are ways of forcing newlines after prompts.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


19,494 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.