## Saving macros

Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

### Re: Saving macros

ema wrote:
Thu 30.05.2019, 20:55
mmmh...I remember in the old versions of MAngband (some years ago) I used keys like "-", "N", "x" and "h", for example...
But now these keys interact with macros in other section of the game (like in the shops) or in creating macros (like \em1h with key "h" as macro command).
In this case should be an error in my sequence macro creating (I see now new command (8,9,0))?
Sorry for my unbelievable english...
Right, those were either "command macros" either "keymaps". They only execute when the game is waiting for a command prompt, and don't interfere with other things. I don't think there's a good way to add "command macros" right now (something's missing in the UI/pref file loader), but I'm fairly sure you can create keymaps.

You will need to edit your pref file by hand, the syntax is very similar to macro definitions (A line with action, followed by C line with mapping), for example:

Code: Select all

# Execute action 'm1b' when 'h' is pressed
A:m1b
C:0:h

(0 here means "normal keymap", 1 would mean "roguelike keymap")

Hope that was of any help.

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

### Re: Saving macros

Troubles on macros continue.
But doesn't matter, I switch on TOme net.
Thx for Your attention anyway, Flambard!