Keyboard macros

or how to add a Quickload feature

While there is a Quicksave feature I could not find the corresponding Quickload.
Neither in the manual nor in the Keyboard shortcut sheet from the sticky post here.

So I fired up Autohotkey and made one.
http://www.autohotkey.com/

It's free so *shrug*.

For Quickload I used the "[" and "]" keys.
One to load the most recent game, the other to dispatch the 2 screens that always pop up when you load a game.

I also like the brief colony list a lot so I put that on F12. =)

These macros include mouse movements tailored to a 1024x768 resolution.
Autohotkey offers tools like a macro/mouse recorder if you wish to adapt them.


Once Autohotkey is installed, all you need to do is to put the code segment in a text file and name it something like
GalCivMacros.ahk

You can then start the macro by double clicking it.
Code
  1. #ifwinactive, ahk_class MTDShell
  2. ;Quick Load 1 ---------------------------
  3. [::
  4. Send, {Escape}
  5. Sleep, 30
  6. MouseClick, left, 590, 739
  7. Sleep, 30
  8. MouseClick, left, 325, 187
  9. MouseClick, left, 325, 187
  10. Return
  11. ;Quick Load 2 (close report + planet screen) --------
  12. ]::
  13. ;With GNN enabled:
  14. Send, {Escape}
  15. Sleep, 30
  16. MouseClick, left, 928, 689
  17. Sleep, 30
  18. MouseClick, left, 946, 686
  19. Sleep, 30
  20. Send, {Tab}
  21. Return
  22. ;Hotkey to bring up the colony list ---------------------------
  23. F12::
  24. Send, {F6}
  25. Sleep, 30
  26. MouseClick, left, 97, 49
  27. Sleep, 30
  28. MouseClick, left, 98, 91
  29. Return
7,994 views 3 replies
Reply #1 Top
For DA, replace the first line with:

#ifwinactive, ahk_class GalCiv2
Reply #2 Top

I am trying to use AutoHotKey to automate the "harvesting" of troops from a planet. Hopefully a macro that would allow me "harvest" 50-250 troops per turn, to be added to what the transport already has, without me needing to calculate anything. For example, the transport has 450 troops on it, I run the macro and it will ask and remember how many troops I want to remove from the planet, 150 per turn, so it will end up with 600, 750 and so on.

Where did you get your info: #ifwinactive, ahk_class GalCiv2? I ended up with "WinActivate, GalCiv2: Dark Avatar v2.01 Dark Avatar" when running AutoScriptWriter when I made a macro for starting galciv2 and loading my saved game.

 

Reply #3 Top

For quickload, press CTRL-L and click LOAD.  It'll load the most recently saved game.  That seems easier (to me, anyway) than using a macro. It can be done from any screen, so you don't need multiple macros to load.

But the question arises - Do you need to reload so many times that a macro is warranted?  Not that there's anything wrong with that.  o_O  

 

Oops.  I just noticed that this is a necromanced thread.  In the words of Rosanna Rosanna Dana, "Never mind."