Posted: Mon Mar 30, 2020 9:54 pm Post subject:
Hotkeys for FinalSun
Subject description: AutoHotkey script for finalsun
This is not a software made by the community
I Got a portable version of AutoHotkey (freeware) and made hotkeys to work for Final Sun.
CTRL + S = Saves map
CTRL + R = Reloads map
CTRL + B = Creates backup version of map (using random letters)
CTRL + O = Opens map
W = Opens TSWavemaker (included)
T = opens Trigger editor
M = Map properties
E = TaskForces
S = Scripts
Y = TeamTypes
N = Opens Notepad++, or asks for to install (ninite installer) if not installed
1 = Select brush size 1x3, 1x2, 1x1 or 10x10
2 = Select brush size 2x2
3 = Select brush size 3x1, 3x3
4 = Select brush size 4x4
5 = Select brush size 5x5
I = Open INI Editor
Alt+ R = opens Rules.ini
From Now on, hold Shift when pressing letters when going though the left list
It is not that hard to create your own hotkeys, just open up autohotkey.ahk inside the Data folder if u want more.
i am trying to figure out more stuff out to perhaps simplify the commands i have right now, because it simply sends the keystrokes into finalsun like a makro. And also to make way more, quick buttons to open for example "Insert INI file content", cuz i've been using that a lot lately. Plus i keep going back and forth from notepad++ into finalsun so its great to have these hotkeys
Anyway i am excited to share this with yall, can't wait to hear more thoughts'
NOTE: USE AT OWN RISK! IT WORKS PERFECT FOR ME, but maybe not for you, bacause the hotkeys will sent the keystrokes to do the action for you for example, when pressing ctrl+r (reload map): it will send: "Alt+F", "Down arrow 7x", and "Enter"
But real fast, and it works (for me)! (and only if finalsun is the active window)
Instructions:
- Unzip anywhere you want.
- Simply open up AutoHotkeyPortable.exe
- Enjoy hotkeys in finalsun!!!
It will already read the file with set hotkeys. It will also only work for Finalsun So it won't mess up anything else.
NOTE: This is For the Patched finalsun only!
Nice, now to see what I can do to make something similar for FA2
There is no Ctrl+O for open...
I can confirm the Hotkeys work and don't interfere with another instance of AutoHotkey (like, say you're using it to make Backspace go up in file explorers in W10 just like WinXP and earlier) with no problems.
EDIT: Beginner mode must be turned off for this to work properly. Just saying in case you're running a fresh FS and forgot about it.
It also might be impossible to launch FS with this running in the background (crash upon map load), and you'll have to launch FS first, then AutoHotkey. Not sure if this is just a problem in my end... QUICK_EDIT
I Completely didn't think of those things ,Also I made this for E1Elite's Final Sun, I'll upload the version for vanilla finalsun in a bit.
How it works, you open Data/AutoHotkey.AHK with text editor,
On the top, you can replace FinalSun with FinalAlert
You can edit this file to how ever you wish, i've been looking up codes and studying the manual to get what i want, so far so good. I'm definitely gonna look into what more i can add. Its hard to navigate through finalsun with the keyboard so i might use an Image search code to click specific area's, the problem is that OS's have different themes, like i use a Windows Black theme that blackens final sun, so i'll first check if there's a code that searches for a button a different way (i don't mind help tbh)
I wanna set numbers as hotkey for selecting 1x1 brush size, etc.
use the mouse scroll button to go through the terrain list,
and if i can make it open the left list and select something from it with a hotkey, then i'll have to create a bunch of those too.
i'll add 'open map' too, btw thats:
$^o:: ; Ctrl+O to open map
Send, !f ; sends alt+f
Send, {down 2}
Send, {Enter} ; sends enter
return ; finishes hotkey
-----------
UDATE:
Alright i found it! i had to install the whole version of AHK, cuz the portable version doesn't have'Windows spy'. When you open windows spy, and click anywhere, it will tell you the ClassNN, so you can make it click any box in final sun, and for the list on the left
ControlClick, ComboBox3 ; this will open up the Brush size!!
ControlClick, x19 y257, FinalSun ; This will click at the coordinates of "Special / Overlay", but since we expand and collapse them, coordinates don't work
Eventhough coordinates work if the window is changed or even the list is outside the screen, cuz the coordinates are FinalSun Specific
Alright, here i go making more hotkeys.
I don't have FinalAlert so if you made some, i can change title to finalsun+finalalert and upload that one too. QUICK_EDIT
Hotkeys for controls which have ID references like menu items can be added to FinalSun and FA2 using resource hacker. Single characters won't do like E or 1 as those can be typed in the text boxes. One has to use Ctrl+E, F2 etc.. Though content of the dropdowns or the the contents of the left panel etc. cannot be done with this method. If mappers have preferences for a particular hotkey to certain menu item, let me know.
UI for FinalSun and FinalAlert2 are same and similar to the patched FinalSun, patched FA2 is here. QUICK_EDIT
Im such a noob lol
Yeah i thought i made sure those single keys would work without interfering, i guess its savest to make turn them into f2, f3 etc or use ctrl, alt or shift.
Thats cool I'll have to check our resource hacker a bit more QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum