Is there any built-in keyboard shortcut for enabling and disabling keypad key macros? If not, is there a script command that can be used to do so?
Enable and disable keypad keys with a macro
Posted by Caelen on Mon 09 Aug 2010 09:11 AM — 6 posts, 28,736 views.
You need to use Accelerator or AcceleratorTo to redefine or unset most macros.
Larkin said:
You need to use Accelerator or AcceleratorTo to redefine or unset most macros.
You need to use Accelerator or AcceleratorTo to redefine or unset most macros.
And those are...?
The specific macros I'm asking about are the keypad keys (the options reached from ctrl+shift+1), since they have a built in checkbox to enable and disable them. I want to be able to toggle that option with an alias or a built-in keyboard shortcut.
<aliases>
<alias
match="disable_keypad"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
SetOption ("keypad_enable", 0)
ColourNote ("cyan", "", "Numeric keypad disabled.")
</send>
</alias>
<alias
match="enable_keypad"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
SetOption ("keypad_enable", 1)
ColourNote ("cyan", "", "Numeric keypad enabled.")
</send>
</alias>
</aliases>
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
Shiny! Thanks. SetOption ("keypad_enable", #) is exactly what I needed. Question though. What's the difference between "print" and "ColourNote"?
EDIT:
I shortened it up a bit, making one alias to turn it on or off so I could assign it to a macro.
And... the code brackets don't seem to be working?
EDIT:
I shortened it up a bit, making one alias to turn it on or off so I could assign it to a macro.
<aliases>
<alias
match="togglekeypad"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if (GetOption("keypad_enable")) == 1 then
print "NUMERIC KEYPAD DISABLED"
SetOption ("keypad_enable", "0")
else
print "NUMERIC KEYPAD ENABLED"
SetOption ("keypad_enable", "1")
end</send>
</alias>
</aliases>And... the code brackets don't seem to be working?
Caelen said:
Shiny! Thanks. SetOption ("keypad_enable", #) is exactly what I needed. Question though. What's the difference between "print" and "ColourNote"?
Shiny! Thanks. SetOption ("keypad_enable", #) is exactly what I needed. Question though. What's the difference between "print" and "ColourNote"?
The print function prints in the world "note" colour as defined in the scripting configuration. ColourNote lets you specify any foreground and background colour you want.
Caelen said:
And... the code brackets don't seem to be working?
And... the code brackets don't seem to be working?
It only auto-detects the [code] tag on an initial post. If you edit later and add tags you have to manually check "Forum codes" on the posting.