[Home] [Downloads] [Search] [Help/forum]

Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Getting Started
. . -> [Subject]  Making a simple trigger

Making a simple trigger

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

Posted by Nick Gammon   Australia  (23,006 posts)  [Biography] bio   Forum Administrator
Date Sun 05 Aug 2007 08:12 AM (UTC)

Amended on Tue 30 Dec 2014 09:46 PM (UTC) by Nick Gammon


Let's look at making a simple trigger. Say we want to detect when we are getting thirsty, and automatically drink something. The most reliable way of making a trigger is to wait for the message to appear:

Thirsty message

Now, Shift+Double-click to select the entire matching line:

Selected line

Press Ctrl+C to copy that line to the Clipboard, and then press Alt+Enter to open the world configuration dialog, select Triggers, and click on Add. (Pressing Shift+Ctrl+8 also opens the world configuration and takes you directly to the triggers list).

Trigger list

Paste the message we want to match on into the Trigger box. Type in what to do when we are thirsty into the Send box (you can make multiple lines if necessary).

Trigger edit

That is all you need to do. Click OK to close the trigger dialog, and Close to close the world configuration dialog.

We can do more, though. Perhaps it would help to colour the matching line in a more distinctive colour. Whilst editing the trigger we can choose one of the custom colours from the drop-down list, or choose "Other" colour, and then click on the two colour swatches to make any foreground and background colour.

Trigger colouring

It might help to have an audible notification. If you want one, click on the Sound "Browse" button, and choose a suitable sound. There are thousands of sounds available over the Internet, or on CDROMs you can purchase in shops:

Browse for sound

Once you have chosen a sound its name is shown in the main trigger window. You can click the Test button to make sure that you have chosen the sound you want.

Test sound

You can always go back to the trigger list, find the trigger you want to change, and amend the way it behaves.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


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

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]