Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Automate a series of script executions, only on demand? (not startup)  (Read 469 times)

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile

For example, you want to run various scripts that has different switches to use in order, but only when you give the command to do so. Basically, to automate a few tasks that you might do when setting up a new embark.

For example, I modified the make_legendary script to make it give a much lesser rating and I would like to set up my embarks with that, instead of during the embark preparation. I would select a dwarf, and execute a command for setting up a miner, or stone crafter.. Stuff like that.

Example:

A command, that when told to execute would trigger within DFHack:
make_legendary skillhere
make_legendary anotherskillhere
and so on for a certain profession

I am aware of macro programs that you can have simulate keystrokes, but that isn't really idea for this use.. So is there a better way?
« Last Edit: September 25, 2014, 12:29:14 pm by BoogieMan »
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Automate a series of script executions, only on demand? (not startup)
« Reply #1 on: September 30, 2014, 03:08:07 am »

Make a batch file that will run console commands in the same folder as dfhack-run.exe and have it contain "dfhack-run (your command here)" for however many lines you want.