How do I make a macro button thats not in the list of macros?
Macros
Posted by Kelvin on Tue 26 Feb 2002 11:32 AM — 15 posts, 41,542 views.
Right now, you don't.
Making every possible keystroke combination "do something" is on the list of things to do.
Making every possible keystroke combination "do something" is on the list of things to do.
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?
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. :)
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. :)
Ah yes, good idea.
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. ;)
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. ;)
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.
I think so, but can you give an example? It isn't totally clear what you want to do.
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
---
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
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
ctrl F1
sends:Channel water
Trigger:*You have recovered equilibrium
send:Channel air
Trigger:*You have recovered equilibrium
send:Channel fire
and so on
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.
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.
I don't really get what you mean, can you give an example of the script and the whole process a bit more detailed?
Step 2 - script for the alias ...
Step 4 - script for the trigger ...
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
Is this perl, java, or Vb?
Quote:
Is this perl, java, or Vb?
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.