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 ➜ General ➜ Macros

Macros

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


Posted by Kelvin   (12 posts)  Bio
Date Tue 26 Feb 2002 11:32 AM (UTC)
Message
How do I make a macro button thats not in the list of macros?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 26 Feb 2002 11:57 AM (UTC)
Message
Right now, you don't.

Making every possible keystroke combination "do something" is on the list of things to do.

- Nick Gammon

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

Posted by Kelvin   (12 posts)  Bio
Date Reply #2 on Tue 26 Feb 2002 12:40 PM (UTC)
Message
How do I change the number 5 on the numberpad into look as a macro instead of the default setting:who like it is now?
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #3 on Tue 26 Feb 2002 01:20 PM (UTC)
Message
kelvin:

Bring up your world properties:

File [Pulldown menu]
World Properties

Under "Input" | "keypad" ...

...you can configure what commands you would like each key on the keypad to send.

Nick:

Someone on my regular mud today said that they have their client programmed so they if they hit CTRL & [Keypad 'direction'], their client will scry in that direction. How convenient!

I know, since you're going to make all keys programmable, the keypad will probably be too...

Perhaps you could extend the use of that keypad configuration screen I mentioned above (if you keep it), so that if you click a radio button or tab (or something), you can quickly configure things like [CTRL Keypad5] or [ALT Keypad5] right from that screen. Of course, I expect you may remove that keypad configuration screen in favor of one cental place to program all key combo's. If you keep the keypad screen, please consider this suggestion. :)

Magnum rambles much when he is sleepy. :)

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 27 Feb 2002 12:33 AM (UTC)
Message
Ah yes, good idea.

- Nick Gammon

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

Posted by Shadowfyr   USA  (1,790 posts)  Bio
Date Reply #5 on Wed 27 Feb 2002 06:41 AM (UTC)
Message
Great.. I see Magnum beat me to it. ;)

In any case just my 2 cents.

A tab for ctrl and alt versions of the keypad would be a lot nicer than sticking it into the marco configuration. Trying to find a mess of key settings in a long list inside a tiny window is both annoying and counter intuative. But then so is editing macros as they stand, but short of a mini keyboard which wouldn't match half those one the market we are basically stuck with that. ;) lol

The way the keypad settings work now are very easy to understand. And it is very nice to know that plans where already in the works to do it.

Now... If I could just figure out how to reprogram the keys for power, sleep and wake on my keyboard that I don't currently use, but windows automaps to use with the motherboard. :p Should be possible, but requires editing the system registry. ;)
Top

Posted by Kelvin   (12 posts)  Bio
Date Reply #6 on Wed 27 Feb 2002 11:28 AM (UTC)

Amended on Wed 27 Feb 2002 12:56 PM (UTC) by Kelvin

Message
Is it possible to script a macro using perl into doing an action with a trigger that will activate after the action is entered an then the trigger will enter another command and so on.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #7 on Wed 27 Feb 2002 09:04 PM (UTC)
Message
I think so, but can you give an example? It isn't totally clear what you want to do.

- Nick Gammon

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

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #8 on Thu 28 Feb 2002 08:03 AM (UTC)

Amended on Thu 28 Feb 2002 08:05 AM (UTC) by Magnum

Message
I'm guessing what Kelvin would like to do, is something like this:
---
Macro: CTRL-G
Send : emote opens his backpack and makes room.
---
Trigger: * opens his backpack and makes room.
Script : Loot_Corpse
---
Sub Loot_Corpse
Bleh
Blah
Blee
End Sub

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Kelvin   (12 posts)  Bio
Date Reply #9 on Thu 28 Feb 2002 08:53 AM (UTC)
Message
Heres an example:
ctrl F1
sends:Channel water
Trigger:*You have recovered equilibrium
send:Channel air
Trigger:*You have recovered equilibrium
send:Channel fire
and so on
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #10 on Thu 28 Feb 2002 08:48 PM (UTC)
Message
I won't try to do it in Perl because I will probably make a syntax error or something, but I would do it like this ...

1. Have the macro (Ctrl+F1) send a made-up word (eg. "++start+chanelling++")

2. Make an alias that matches on that word ("++start+chanelling++") - the alias sends the first command "Channel water" and sets a MUSHclient variable to 1.

3. Make a trigger that matches the response ("*You have recovered equilibrium") and have the trigger call a script.

4. The trigger script consults the variable and send the next reply ("Channel fire" etc.) and adds one to the variable.

Then, next time the trigger matches step (4) will repeat until you have run out of things to do.

- Nick Gammon

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

Posted by Kelvin   (12 posts)  Bio
Date Reply #11 on Fri 01 Mar 2002 12:07 PM (UTC)
Message
I don't really get what you mean, can you give an example of the script and the whole process a bit more detailed?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #12 on Fri 01 Mar 2002 09:41 PM (UTC)
Message
Step 2 - script for the alias ...


sub OnInitialChannel
{
 $world->SetVariable ("channel_sequence", 0);
} # end of OnInitialChannel





Step 4 - script for the trigger ...


sub OnRecovery
{

# list of messages 

@messagelist = ("Channel water", 
                "Channel air", 
                "Channel fire", 
                "etc.");
 
# find where we are in the sequence

my ($counter) = $world->GetVariable ("channel_sequence");

# display the current message

$world->note (@messagelist [$counter]);

# move to next one

$counter++;

# remember for next time trigger fires

$world->SetVariable ("channel_sequence", $counter);

} # end of OnRecovery



- Nick Gammon

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

Posted by Kelvin   (12 posts)  Bio
Date Reply #13 on Fri 01 Mar 2002 10:33 PM (UTC)
Message
Is this perl, java, or Vb?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #14 on Sat 02 Mar 2002 03:10 AM (UTC)
Message
Quote:

Is this perl, java, or Vb?


You asked previously "Is it possible to script a macro using perl into doing an action with a trigger", thus the example I gave was in Perlscript.

- 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.


28,850 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.