Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Record and replay sequence of keys (macro)  (Read 788 times)

isd

  • Bay Watcher
    • View Profile
Record and replay sequence of keys (macro)
« on: March 25, 2008, 03:00:00 am »

Everyone who have used the text editor VIM knows that there is a wonderful and very powerful feature :

When you press 'q' 2 times you enter record mode.
From this point everything you type is recorded (while you are doing it)
When you press q again your stop the recording.

Then if you press '@' and 'q' you have all youe recorded key sequence played again.

You could start another recording with 'q' and 'w'
Then replay this sequence in pressing '@' and 'w'
etc... if you need to record a lot of sequences.

There is also another very powerful feature:
the possibility to create commands with parameters.
Let's say you explicitely write a key sequence for wearing an armor, and taking a precise weapon for example. You would like to apply this same action to several dwarves.
So you could point a dwarf and apply the action...

Well, this is a rather abstract proposition, but since everything can be done with keys, having some sort of (even simple) macro system would be nice...
Especially when wars become complicated.

Maybe it was already on the map and I haven't seen it... if it is the case, sorry.

Logged

Tacroy

  • Bay Watcher
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #1 on: March 25, 2008, 03:42:00 am »

This been suggested fifty quintillion times, and it's an OK idea, but Toady is unlikely to get around to it until the interface is more or less hammered out. After all, what would be the point of macros if you can, for instance, store blueprints that are mined out/built and filled with furniture automatically?

In the meantime, you can use an external macro program like AutoHotKey; it's what I use when making giant, multi-story water tanks.

[ March 25, 2008: Message edited by: Tacroy ]

Logged

isd

  • Bay Watcher
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #2 on: March 25, 2008, 04:00:00 am »

quote:
Originally posted by Tacroy:
<STRONG>This been suggested fifty quintillion times, and it's an OK idea, but Toady is unlikely to get around to it until the interface is more or less hammered out. After all, what would be the point of macros if you can, for instance, store blueprints that are mined out/built and filled with furniture automatically?

In the meantime, you can use an external macro program like AutoHotKey; it's what I use when making giant, multi-story water tanks.

[ March 25, 2008: Message edited by: Tacroy ]</STRONG>


Thanks.
Yeah, I already use autohotkey, but it is not as instant as the Vim macro feature.

I think the macro feature would especially be useful for large army movements for example... but since the army arc is not yet finished, only patience will do  ;)

Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #3 on: March 25, 2008, 01:24:00 pm »

quote:
Originally posted by isd:
<STRONG>Vim</STRONG>

EMACS!

Logged

axus

  • Bay Watcher
  • Axe Murderer
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #4 on: March 25, 2008, 11:07:00 pm »

I'd like something like a construction recorder... instead of hitting ;, some other key will start recording all designations you make.  Hit it again to save it to a list of constructions.  This would be more flexible than a straight macro recorder, because you could fix mistakes before saving it.
Logged

isd

  • Bay Watcher
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #5 on: March 26, 2008, 12:32:00 am »

quote:
Originally posted by Draco18s:
<STRONG>

EMACS!</STRONG>


I like ONE-KEY shortcuts. Can even use them with one hand.
I configured Opera this way also, I don't even need the tab bar anymore, very slick... It's like the morning of the web-navigation (after a painful and long cluttered night)

Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Record and replay sequence of keys (macro)
« Reply #6 on: March 26, 2008, 02:25:00 am »

quote:
Originally posted by isd:
<STRONG>I like ONE-KEY shortcuts. Can even use them with one hand.</STRONG>

While true, I'd linked to XKCD's "Real Programers" strip. :P
Real Programers use Butterflies.

Logged