Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Integrating Keyboard Macros  (Read 1105 times)

Lav

  • Bay Watcher
    • View Profile
Integrating Keyboard Macros
« on: April 27, 2009, 04:15:17 am »

A very simple feature from my favourite file manager.

You click Ctrl-., the program enters the macro mode - everything works as normal but the keyboard code is recording every key and key combination you press.

You click some keys - for example defining a digging area or whatever.

You click Ctrl-. again, the program asks you for macro key to bind the key sequence to.

You click the macro key and the keyboard code just puts the entire memorized sequence into keybuffer.

Jnly the code block that is responsible for keyboard interaction needs to be modified - the rest of the game code may be left unaware that something has changed.

Will make mining and building designations so much easier, especially for complex repetitive constructions like stairwells or exploratory mining.
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Integrating Keyboard Macros
« Reply #1 on: April 27, 2009, 09:44:41 am »

OR  Just distribute a version of dwarf fortress with Auto Hot Key since it is a General Public License program.

No reason to reinvent the wheel after all.

http://www.autohotkey.com/
« Last Edit: April 27, 2009, 09:48:03 am by profit »
Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

ThtblovesDF

  • Bay Watcher
    • View Profile
Re: Integrating Keyboard Macros
« Reply #2 on: April 27, 2009, 10:48:01 am »

My soul for anything that unpaused the game while i K-look or d-esignate
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: Integrating Keyboard Macros
« Reply #3 on: April 27, 2009, 11:41:40 am »

Profit: AutoHotKey may be nice and all for Windows users, but they aren't the only people who play DF. And just because it's a GPLed program doesn't mean it'd be remotely straightforward to port to another OS.

I could see a macroing system like the one the OP describes coming in handy. Dunno if it'd be worth Toady's time, but it'd be useful for players.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Integrating Keyboard Macros
« Reply #4 on: April 27, 2009, 07:46:08 pm »

Profit: AutoHotKey may be nice and all for Windows users, but they aren't the only people who play DF. And just because it's a GPLed program doesn't mean it'd be remotely straightforward to port to another OS.

I could see a macroing system like the one the OP describes coming in handy. Dunno if it'd be worth Toady's time, but it'd be useful for players.
That's true that it is not available for every OS, but that is because mac and linux have their own macro utility's.   I really think interface streamlining is the way to go rather than built in macro utilities. Templates... They are a different and good idea.. Which have been discussed to death and would work much smoother and better than a macro to do the same thing.

Also no pause while designating and inspecting has been requested, but until toady learns how to multithread properly it will not be coming. =(
 
Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.