Keyboard macros for WitE

Share your gameplay tips, secret tactics and fabulous strategies with fellow gamers here.

Moderators: Joel Billings, Sabre21

Post Reply
eskuche
Posts: 1152
Joined: Tue Mar 27, 2018 2:29 am
Location: OH, USA

Keyboard macros for WitE

Post by eskuche »

Hello all,
I've compiled several keyboard macros that help me click less, mainly when doing airgroup microing. This will need a third party program called Autohotkey. In brief, how this program works is that once it is installed you can activate macro files which connect shortcut keys with multiple keystrokes/mouse clicks. A green [H] icon will appear on the desktop taskbar, which lets you edit, reload, and exit each individual macro file. The actual macro file is attached below and needs to be right clicked and run as an administrator, at least for me, to work in WitE. Here is the series of macros I have currently going. Note that many of the coordinates need to be tweaked for your system. I use dual 1920x1080 screens.

I am happy to answer general questions to compile into a FAQ post and may, time-dependent, be able to help individuals with their setup or new ideas for macros. The program is very robust, and I have scratched only the surface. Example things I want to eventually accomplish are hotkeys to get to a certain commander report setup (all German fights, all infantry over/under x morale, all airgroups under a certain base, etc.)

1. [Toggled on and off by removing comment sections]: Mouse coordinate viewer.
2. Clicking a city window for a brief time (for me to see supply details).
3. Screenshot macro that copy pastes a series of map images to stitch in your favorite image-editing program.
4. Stop command for looping macros.
5. Airgroup commands: setting ranges (0/unlimited, 1, or arbitrary number) or fighter/bomber status for one airgroup
6. Looped airgroup commands to do this for 9 airgroups in an airbase.

Additional documentation and comments are in the actual file, which can be modified in notepad or any other word-processing program, either directly from its stored location (anywhere) or from the taskbar (right click -> edit).
Attachments
WITE.zip
(1.38 KiB) Downloaded 59 times
eskuche
Posts: 1152
Joined: Tue Mar 27, 2018 2:29 am
Location: OH, USA

RE: Keyboard macros for WitE

Post by eskuche »

Reserved
User avatar
Telemecus
Posts: 4689
Joined: Sun Mar 20, 2016 8:32 pm
Contact:

RE: Keyboard macros for WitE

Post by Telemecus »

Fabulous work and a great thing to share with the community!
Wargamers Discord https://discord.gg/U6DcDxT
User avatar
joelmar
Posts: 1027
Joined: Sat Mar 16, 2019 4:05 pm

RE: Keyboard macros for WitE

Post by joelmar »

Yes, super cool stuff... I have problems with the screen coordinates utility, when I uncomment those lines, the script won't start, maybe I need to install some software for that?

And then, nothing really works, except screen capture that sends always the same part of the screen to Photoshop... [:D] but I will figure it out later on.

Thanks!
"The closer you get to the meaning, the sooner you'll know that you're dreamin'" -Dio
eskuche
Posts: 1152
Joined: Tue Mar 27, 2018 2:29 am
Location: OH, USA

RE: Keyboard macros for WitE

Post by eskuche »

Had a single line comment error that was preventing the annotated script from activating the program. Re-uploaded and should be good now!
User avatar
EwaldvonKleist
Posts: 2374
Joined: Thu Apr 14, 2016 3:58 pm
Location: Berlin, Germany

RE: Keyboard macros for WitE

Post by EwaldvonKleist »

Good work and thank you for sharing! Will be put in the library of course. Your idea has the potential to help users with some of the weakest and most boring parts of WitE.

1) One issue I see is the fact that each user with different screen resolution/GUI settings will have to set many of the coordinates anew.
Is it possible to give coordinates not in absolute, but relative values, so it automatically resizes with the screen (assuming the WitE GUI also proportionally resizes)?
2) Some of your Macros (e.g. the 9 airgroup loop) take a while due to the sleep. I assume the sleep is set so high because the WitE GUI needs time to react?
3)Can the program take user interfaces, e.g. open a pop-up window where you enter the air range/TOE etc. you want to set a list of airgroups/units to?
4) These macros could also be useful if you want to make repeated tests to get much data, e.g. to compare combat results of a unit with 0% fatigue to one with 60% fatigue, although you will likely need some other scripts/software to retrieve the data.

Regards
EvK
eskuche
Posts: 1152
Joined: Tue Mar 27, 2018 2:29 am
Location: OH, USA

RE: Keyboard macros for WitE

Post by eskuche »

1) I don’t think so...I have a gut feeling the GUI is a static size with only the game map region changing. I did identify an easier way to see coordinates (window spy function when right clicking the icon). Will update post to reflect this.
2) Yes, the game is rather clunky and unresponsive at times. Most of the interface screen toggles have a delay. The only exception I’ve really noticed is toggling refit in commander report, which is instant.
3) Just looked this up and apparently you can! Asks for input and outputs as variables. However because of the clunkiness will likely need to import as three separate digits still unless the variables can be deconcatenated. Will work on this this weekend.
4) Yep! As you alluded to before. It would require text recognition which is beyond my working expertise. My tests (such as attrition rate) had been done mostly manually but automation to take screencaps and load/reload would be a good start.

Thanks for feedback, cheers.
User avatar
Killmaster851
Posts: 91
Joined: Sun Jan 22, 2017 6:07 pm

RE: Keyboard macros for WitE

Post by Killmaster851 »

Thanks Bro[8D]
Kenny❤️
Post Reply

Return to “The War Room”