Fullscreen script (Dual Screen & Single Screen)

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Re: Fullscreen script (updated)

Postby benikens » 23 May 2016, 06:25

It works! I just used some scripts I found on ze googles and it worked perfectly. Here's the full script is anyone is interested:

Code: Select all
    #NoEnv
    SendMode Input
    SetWorkingDir %A_ScriptDir%
    #Persistent


    procName := "ForgedAlliance.exe"
    SetTimer, CheckProc, 2000
    Return

    CheckProc:
        If (!ProcessExist(procName))
            Return
         
         
        WinGet Style, Style, % "ahk_exe " procName
        If (Style & 0xC40000)
        {
       DPI_F:=DPIFactor()
       ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1920) , (Hei:=1080) , (Hz:=60) )
            WinSet, Style, -0xC40000, % "ahk_exe " procName
            WinMinimize, % "ahk_exe " procName
            WinMaximize, % "ahk_exe " procName
          Run, %comspec% /c process -a forgedalliance.exe 111111111110
          Run, %comspec% /c process -p forgedalliance.exe high
        }
        Return

    ProcessExist(exeName)
    {
       Process, Exist, %exeName%
       return !!ERRORLEVEL
    }
    return




DPIFactor()
{
RegRead, DPI_value, HKEY_CURRENT_USER, Control Panel\Desktop\WindowMetrics, AppliedDPI
; the reg key was not found - it means default settings
; 96 is the default font size setting
if (errorlevel=1) OR (DPI_value=96 )
   return 1
else
   Return  DPI_Value/96
}



ChangeDisplaySettings( cD, sW, sH, rR ) {
  VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
  DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
  NumPut(cD,dM,104),  NumPut(sW,dM,108),  NumPut(sH,dM,112),  NumPut(rR,dM,120)
  Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}
benikens
Avatar-of-War
 
Posts: 77
Joined: 20 Nov 2013, 06:56
Has liked: 0 time
Been liked: 11 times
FAF User Name: Benikens

Re: Fullscreen script (updated)

Postby SeraphimLeftNut » 22 Jun 2016, 21:02

A warning. This script screwed up the memory management of FA. Capping nonpaged pool at 64mb.

I wish I could play in fullscreen mode, but now half the games that start in fullscreen lose the cursor.(happens when you tab back during loading or click some other window after fa starts loading)
I remember someone suggested, full screen mode "profit".
Not really

https://technet.microsoft.com/en-us/sys ... lorer.aspx

above tool can be used to monitor nonpaged pool of all your programs.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Fullscreen script (updated)

Postby Viba » 22 Jun 2016, 21:45

GameCompanion works nicely for fullscreen windowed mode if you don't use this script.
Viba
Councillor - Moderation
 
Posts: 746
Joined: 22 Jan 2015, 21:42
Has liked: 144 times
Been liked: 224 times
FAF User Name: !smurfcheck Viba

Re: Fullscreen script (updated)

Postby tatsu » 14 Jul 2016, 12:51

benikens wrote:I found a script that I think does the scale like I want I'm going to test it shortly. I can change those settings in windows without logging out so I assume we can automate this.

you still need help on this?

because I think it's doable with AHK alone.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby tatsu » 13 Sep 2016, 16:21

Viba wrote:GameCompanion works nicely for fullscreen windowed mode if you don't use this script.

however that leaves out the optimization tweaks.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby benikens » 29 Sep 2016, 01:30

Didn't see your reply Tatsu, I managed to get a script working which is the one I posted above. I've since moved on from that laptop so I'm not using it anymore. The only issue was for some parts of windows scaling to take effect it wants you to relog in windows so what I found was that if I had it setup for faf relogged then put it back to normal for other activities I could use the script without issue but if I logged out and in in my normal scaling settings then the script failed.
benikens
Avatar-of-War
 
Posts: 77
Joined: 20 Nov 2013, 06:56
Has liked: 0 time
Been liked: 11 times
FAF User Name: Benikens

Re: Fullscreen script (updated)

Postby tatsu » 10 Dec 2016, 03:20

boop
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby tatsu » 02 Jan 2017, 12:22

still loving my script <3
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby RealityCheck » 28 Jan 2017, 06:38

Very useful script, tatsu, thanks! Also thanks to CodingSquirrel for adapting the script for two monitors.
RealityCheck
Avatar-of-War
 
Posts: 54
Joined: 28 Nov 2015, 19:19
Has liked: 13 times
Been liked: 20 times
FAF User Name: RealityCheck

Re: Fullscreen script (updated)

Postby tatsu » 05 Feb 2017, 03:45

RealityCheck wrote:Very useful script, tatsu, thanks! Also thanks to CodingSquirrel for adapting the script for two monitors.

welcome! and yeah coding squirrel's version is great too!
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest