Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Dec 14, 2024 12:54 am
All times are UTC + 0
Hotkeys for FinalSun
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Mon Mar 30, 2020 9:54 pm    Post subject:  Hotkeys for FinalSun
Subject description: AutoHotkey script for finalsun
Reply with quote  Mark this post and the followings unread

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)

Smile

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 Smile So it won't mess up anything else.

NOTE: This is For the Patched finalsun only!



Hotkeysv1.2.zip
 Description:
For the Patched finalsun only!

Download
 Filename:  Hotkeysv1.2.zip
 Filesize:  13.26 MB
 Downloaded:  16 Time(s)


Last edited by Holland on Tue Mar 31, 2020 1:41 pm; edited 3 times in total

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Tue Mar 31, 2020 4:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Nice, now to see what I can do to make something similar for FA2 Smile

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...

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Tue Mar 31, 2020 10:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks TAK02!

I Completely didn't think of those things Laughing Embarassed ,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  Sad
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.

Back to top
View user's profile Send private message
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Wed Apr 01, 2020 3:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Excellent work, Holland! These hot keys should make mapping a lot easier

_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Thu Apr 02, 2020 11:58 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Thu Apr 02, 2020 10:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Apr 03, 2020 5:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Added hotkeys for the patched versions of FS/FA2, check the updates.

Back to top
View user's profile Send private message
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Fri Apr 03, 2020 10:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

OMG you got ALL of the menu items! holy cow!
Thank you so much e1elite!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.2683s ][ Queries: 13 (0.0115s) ][ Debug on ]