This is coded in AHK (auto hot key) and in 2 seconds does my favorite layout for play (4 windows).
Needless to say, it would be cool if such functionality was in the game. I am amazed that the Window GUI for TTD/OTTD is some of the best I have seen in a game from a prehistoric time when DOS 6 and Windows 3 ruled the Earth.
PM me if you are interested to received the video, MP4. It is below the limit 25Mb Gmail limit.
NOTE: Not this is not a mod and doesn't touch the code; just the UI. Due to some twitchy things, this coding will only work for me. But it is a mock up.
Sample code below ...
; Make the mouse wheel zoom in and out in CMBB/CMAK - 08/29/15 changed for CMBN
;
; ? - 11/27/09 (revised 08/29/15)
; 09/20/15 Fixed window context bug
; 03/05/16 Changed shutdown of AHK (to resolve keys being forgotten)
; 03/06/16 Another try at fixing hotkey problem (was the screen shot code)
; 05/27/16 Prevent accidental overwriting of movies
; 12/09/16 Allow for a more incremental zoom in and out
; 12/11/18 Simulate F11 and F12 for AJE engine
; 12/27/18 Simulate replay keys.
; 01/12/19 Simulate scroll arrows
; 03/13/19 Work for RT2 screen shots
; 04/02/19 Work for OTTD screen shots
; 04/10/19 Fix for modded screen shots
; 04/20/19 75% to opening favorite template
; 04/22/19 Favorite template now working
#NoTrayIcon
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode 1
#SingleInstance force
#Persistent
Sleep, 30000
SetTimer, ScriptDone, 100
Return
ScriptDone:
IfWinNotExist,OTTDMRunning,
ExitApp
Return
#IfWinExist ,OTTDMRunning,
; PrintScreen Alternate
PrintScreen::!z
; Configure Key Windows
F4::
{
Send {F4 Down} ; drop map and cargo
Sleep, 100
Send {F4 Up}
Sleep, 300
MouseMove,487,16,0,
Sleep, 100
Click down
Sleep, 100
MouseMove,536,61,0,
Sleep 100
Click up
Sleep 100 ; map minimize and drag
MouseMove,885,41,0,
Click down
Sleep 100
Click up
Sleep 100
MouseMove,859,42,0,
Click down
Sleep 100
MouseMove,1846,11,0,
Click up
Sleep 100 ; cargo minimize and drag
MouseMove,743,62,0,
Click down
Sleep 100
Click up
Sleep 100
MouseMove,714,64,0,
Click down
Sleep 100
MouseMove,1843,32,0,
Click up
Sleep, 100 ; drop stations
Send {F7 Down}
Sleep, 100
Send {F7 Up}
Sleep 100 ; stations minimize and drag
MouseMove,775,43,0,
Click down
Sleep 100
Click up
Sleep 100
MouseMove,740,43,0,
Click down
Sleep 100
MouseMove,1849,53,0,
Click up
Sleep, 100 ; drop towns
Send {F5 Down}
Sleep, 100
Send {F5 Up}
Sleep 100 ; towns minimize and drag
MouseMove,232,43,0,
Click down
Sleep 100
Click up
Sleep 100
MouseMove,206,41,0,
Click down
Sleep 100
MouseMove,1851,75,0,
Click up
Return
}
@DEV (&others) 19Mb MP4 of favorite layout config running
Moderator: OpenTTD Developers
Who is online
Users browsing this forum: Bing [Bot] and 41 guests