Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Keyboard Shortcut for Closing Windows?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Distant Worlds Series >> Keyboard Shortcut for Closing Windows? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Keyboard Shortcut for Closing Windows? - 8/2/2018 4:29:53 PM   
Chimera533

 

Posts: 3
Joined: 8/2/2018
Status: offline
I'm looking to map a button on my Steam Controller to close windows in the game. The best I can find is a guide for AutoHotKey. Since I can't post links, you can google this to find it:

How to create a hotkey to close in game screens and dialogues (AutoHotKey solution) + some other cool shortcuts

I'm not familiar with AutoHotKey but it looks like the script is doing a lot more than just remapping a key. Just wondering if there is a simple way to do this. If this is the only way I suppose I can just use this script then map my controller button to the button in the script.
Post #: 1
RE: Keyboard Shortcut for Closing Windows? - 8/4/2018 12:51:02 AM   
Chimera533

 

Posts: 3
Joined: 8/2/2018
Status: offline
If anyone is interested, I could not find a shortcut to natively close in-game windows but the AutoHotKey script works a charm. I gave myself a crash course in AutoHotKey and bound the window close commands to a key combo that I'm pretty sure Distant Worlds doesn't use. Then I bound that key combo to my Steam Controller and it works without fail (so far).

(in reply to Chimera533)
Post #: 2
RE: Keyboard Shortcut for Closing Windows? - 8/4/2018 8:15:04 PM   
rxnnxs

 

Posts: 36
Joined: 6/1/2013
Status: offline
I am interested in your AHK script.
I also did not like the ESC behaviour. I would like to close all open windows before going into optinos mode.
Now if you already have a AHK script that, lets say, lays all close windows commands to "Q", this would be fantastic!

(in reply to Chimera533)
Post #: 3
RE: Keyboard Shortcut for Closing Windows? - 8/4/2018 9:02:20 PM   
Chimera533

 

Posts: 3
Joined: 8/2/2018
Status: offline
Here it is. It's just the same script from the guide that you can google but with different key bindings:
#IfWinActive, Distant Worlds
#MaxThreads 1
SendMode Event
SetControlDelay, -1
SetKeyDelay, 20
SetMouseDelay, -1
FirstTime:=True

>^]::Suspend

>^\::  ; Change XButton1 to Esc if you prefer standard UI feel keys
	{
	ControlClick, Close
	;ControlClick, Cancel
	ControlGet, isGoodbyeVis, Visible, , Goodbye
	ControlGet, isNothanksVis, Visible, , No thanks
	If isGoodbyeVis
	{
		ControlFocus, Goodbye
		ControlSend, Goodbye, {Enter}
	}
	If isNothanksVis
	{
		ControlFocus, No thanks
		ControlSend, No thanks, {Enter}
	}
	return
	}



This binds RCTL+] to suspend the script and RCTL+\ to close windows. I haven't had a need to suspend the script but I kept the functionality just in case. If you want to use the Q key to close windows, you should just be able to replace this line:
>^\::  ; Change XButton1 to Esc if you prefer standard UI feel keys

with this line:
q::  ; Change XButton1 to Esc if you prefer standard UI feel keys

There are ways to launch the game from the AHK script and close the script after the game closes but don't ask me how. I basically just learned enough to get me going. I also use another program to change my desktop resolution before launching the game so I have a hacked together solution that calls a bunch of things from a batch file including this AHK script.

(in reply to rxnnxs)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Distant Worlds Series >> Keyboard Shortcut for Closing Windows? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.102