Fullscreen script (Dual Screen & Single Screen)

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Re: Fullscreen script (updated)

Postby tatsu » 29 Sep 2018, 12:11

.
Last edited by tatsu on 01 Apr 2020, 19:03, edited 1 time in total.
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 ChaosRefractor » 29 Sep 2018, 18:48

kkk
no.
swap code and anus and you will make sense.
ChaosRefractor
Crusader
 
Posts: 27
Joined: 17 Mar 2018, 01:46
Has liked: 0 time
Been liked: 2 times
FAF User Name: ChaosRefractor

Re: Fullscreen script (updated)

Postby tatsu » 30 Sep 2018, 01:05

.
Last edited by tatsu on 01 Apr 2020, 19:03, edited 1 time in total.
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 ChaosRefractor » 01 Oct 2018, 08:28

I wrote a code too!
Spoiler: show
Code: Select all
#SingleInstance, force
SysGet, Monitor2, Monitor, 2
SysGet, VirtualWidth, 78
MsgBox This is a code to preview your viewing area, calculate the coordinates for monitor 2 and display your total viewing width.`n`rPress "Enter" to continue.
Gosub MonitorCheck
Return

MonitorCheck:
   Gui, Add, Checkbox, x10 y20 h13 w13 vCheckMonitor
   Gui, Add, Text, x30 y20, Check this if you actually have a monitor.
   Gui, Add, Button, x10 y50 w90 h20 gIDo, Between 0 and 1
   Loop, 28
      Gui, Add, Button,w90 h20 gIDo, I Do, %A_Index%
   Gui, Add, Button,w90 h20 gIDo Default, I don't know
   Gui, Add, Button, x110 y50 w90 h20 gIDo Default, Doh!
   Gui, Show, , Just Checking
Return

IDo:
   GuiCount:=  StrSplit(A_GuiControl, , "I Do, ")
   ParseCount:=  GuiCount[1]GuiCount[2]
      If ParseCount is Integer
         MonitorCount:=  ParseCount
      Else
         MonitorCount:=
   Gui, Submit
   Gui, Destroy
      If (CheckMonitor = 1) {
            If MonitorCount is Integer
               MsgBox I'm glad you can see me!`n`rThat means you have not only %MonitorCount% monitor(s), but maybe a mouse and a keyboard as well!!`n`rNow lets proceed, press "Enter" again.
            Else
               MsgBox I'm glad you can see me!`n`rThat means you have not only a monitor, but maybe a mouse and a keyboard as well!!`n`rNow lets proceed, press "Enter" again.
         Gosub MonitorCount
      } Else {
         MsgBox How the f*** do you want to play without that monitor?`n`rGo back there and check that checkbox.
         Gosub MonitorCheck
      }
Return

MonitorCount:
   Gui, Add, Edit, x10 y20 w20 h20 vMonitorCount, %MonitorCount%
   Gui, Add, Text, x40 y23, Really, how many monitors do you actually to have? You can't have as many as you want!!
   Gui, Add, Button,w90 h20 gMonitorCountConfirm Default, Go on...
   Gui, Show, , It's 1`, then 2`, and only then 3`, this is no JS!!
Return

MonitorCountConfirm:
   Gui, Submit
   Gui, Destroy
      If MonitorCount is not Integer
            If MonitorCount =
               MonitorCount:= "no"
            Else
               MonitorCount:= "..."
   MsgBox So, you say you really have %MonitorCount% Monitor(s)...`n`rBut, You know what? That Doesn't matter!!`n`rWe'll be going with 3 anyways!!`n`rPress "Enter" To confirm.
   Gosub MonitorConfig
Return

MonitorConfig:
   Gui, New
   Gui, Add, Text, x30 y20, Check this if you have an extra monitor to your left.
   Gui, Add, Radio, x10 Y20 h13 w13 vCheckMonitorLeft
   Gui, Add, Text, x30 y50, Check this if you still have a main monitor at your center.
   Gui, Add, Radio, x10 Y50 h13 w13 vCheckMonitorCenter
   Gui, Add, Text, x30 y80, Check this if you have an extra monitor to your Right.
   Gui, Add, Radio, x10 y80 h13 w13 vCheckMonitorRight
   Gui, Add, Button, x10 y110 w90 h20 gMonitorPositions Default, ...
   Gui, Show, , Pick all three.
Return

MonitorPositions:
   Gui, Submit
   Gui, Destroy   
   MonitorLeft=-x
   MonitorCenter=x
   MonitorRight=x
      If (CheckMonitorLeft=1 AND CheckMonitorCenter=1 AND CheckMonitorRight=1) {
         MsgBox Congrats!!`n`rI see you are catchin' up with the spirit of things!!`n`rNext, we are going to calculate each monitor position.`n`rEvery monitor screen width has a dimention of "x" pixels.`n`rThat's equal to the first number of your resolution.`n`rIn a 1920x1080 resolution, your "x" is 1920, and 1080 is sometimes "p", sometimes "i".`n`rTheres actually a built-in variable for the main monitor, it's A_ScreenWidth!`n`rNow, your main monitor goes from 0 to "x", and subsequent monitors to your RIGHT add on to that.`n`rA monitor to your LEFT goes from "-x" to 0, and subsequent monitors add on to that.`n`rSo...`n`rIt's -x+-x to 0+-x for a second left monitor, which you don't have!`n`rNow lets remember one more time:`n`rLeft Monitors = -x`n`rAll other monitors left, in that case you main and right, are = x.`n`rPress "Enter" To Display the results of how your viewing area will look like.
         Gosub Results
      } Else {
         MsgBox You didn't pick all three.
         Gosub MonitorConfig
      }   
Return

Results:
   Msgbox So, this is how your screen will look like:
   Gosub YourRealResult
Return

YourRealResult:
   Msgbox %  MonitorLeft MonitorCenter MonitorRight
   Gosub YourRealRealResult
Return

YourRealRealResult:
   Msgbox Do you know what that means?`n`rThat means no pr0n for you!!`n`r`n`rBut since we are actually discussing a 2 monitor setup with the extra monitor to the other right...`n`rLets try again and see what the real results are!
   Gosub YourRealRealRealResult
Return

YourRealRealRealResult:
   Msgbox here's how it will look like:
   Gosub YourRealRealRealRealResult
Return

YourRealRealRealRealResult:
   Msgbox % MonitorLeft MonitorCenter
   Gosub YourRealRealRealRealRealResult
Return

YourRealRealRealRealRealResult:
   Msgbox Don't you know what that means?`n`r`n`rThat means no cherry pie for you!!`n`rIt also means you may have 2, but you don't have 3 monitors!!
   Gosub Conclusion
Return

Conclusion:
      If Monitor2Left is Integer
         Msgbox Your actual monitor 2 coordinates are %Monitor2Left% left and %Monitor2Right% right.`n`rYour total viewing width is %VirtualWidth% pixels.`n`r`n`rThanks for reading.`n`rBye!!
      Else
         Msgbox You do not have a second monitor.`n`rYour total viewing width is %VirtualWidth% pixels.`n`r`n`rThanks for reading.`n`rBye!!
ExitApp

Enjoy!!
Last edited by ChaosRefractor on 22 Oct 2018, 10:56, edited 1 time in total.
ChaosRefractor
Crusader
 
Posts: 27
Joined: 17 Mar 2018, 01:46
Has liked: 0 time
Been liked: 2 times
FAF User Name: ChaosRefractor

Re: Fullscreen script (updated)

Postby ____ » 18 Oct 2018, 11:41

First of all: Very impressive work, this is a very massive improvement to fullscreen :)

Unfortunately, I currently have a problem with the dual screen script from CodingSquirrel.
The script itself works in what it is trying to achieve, however it breaks the custom refresh rate of my first monitor (144hz) and just uses the refresh rate of my second monitor (60hz) for the game.

Is there any possible workaround for this problem?
____
Avatar-of-War
 
Posts: 171
Joined: 02 Feb 2018, 15:55
Has liked: 48 times
Been liked: 24 times

Re: Fullscreen script (updated)

Postby JoonasTo » 18 Oct 2018, 12:49

Define breaks, it forces both screens to refresh at 60 hz? Or just that the game updates only at 60 fps?

Because the first should not have anything to do with the game/script but would be a windows feature regarding shared apllication windows between screens.

The second you should be able to override with a custom setting for FA.
User avatar
JoonasTo
Priest
 
Posts: 498
Joined: 08 Feb 2015, 01:11
Has liked: 18 times
Been liked: 81 times
FAF User Name: JoonasTo

Re: Fullscreen script (updated)

Postby ChaosRefractor » 21 Oct 2018, 04:06

yeah! just disable that setting i forgot what it's called!!
ChaosRefractor
Crusader
 
Posts: 27
Joined: 17 Mar 2018, 01:46
Has liked: 0 time
Been liked: 2 times
FAF User Name: ChaosRefractor

Re: Fullscreen script (updated)

Postby ____ » 21 Oct 2018, 14:08

It’s the first one.
I did some research and tried pretty much everything. There does not seem to be a solution for this problem. Just Windows 10 things…

Thanks anyway.
____
Avatar-of-War
 
Posts: 171
Joined: 02 Feb 2018, 15:55
Has liked: 48 times
Been liked: 24 times

Re: Fullscreen script (updated)

Postby ChaosRefractor » 22 Oct 2018, 06:23

It's a coordinate coordination issue, pardon me.
ChaosRefractor
Crusader
 
Posts: 27
Joined: 17 Mar 2018, 01:46
Has liked: 0 time
Been liked: 2 times
FAF User Name: ChaosRefractor

Re: Fullscreen script (updated)

Postby ChaosRefractor » 12 Nov 2018, 12:46

Well,
Since I could not get teased enough to provide some sort of non-destructive context outside my jabbering, I'm just gonna drop what I got here. Enjoy.
Code: Select all
SysGet, Monitor2, Monitor, 2

Xbutton1 & ScrollLock::
   Toggle := !Toggle
      If (Toggle) {
         WinGet, S, Style, Forged Alliance
            If (Style != -0xC40000)
               WinSet, Style, -0xC40000, Forged Alliance
            If (Monitor2Left = -A_ScreenWidth)
               WinMove, Forged Alliance, , -A_ScreenWidth, 0, A_ScreenWidth, A_ScreenHeight
            If (Monitor2Right = 2*A_ScreenWidth)
               WinMove, Forged Alliance, , 0, 0, 2*A_ScreenWidth, A_ScreenHeight
      } Else {
         WinGet, S, Style, Forged Alliance
            If (Style != -0xC40000)
               WinSet, Style, -0xC40000, Forged Alliance
         WinMove, Forged Alliance, , 0, 0, A_ScreenWidth, A_ScreenHeight
      }
   WinMaximize, Forged Alliance
   WinRestore, Forged Alliance
   WinActivate, Forged Alliance
Return
Thanks and regards.
ChaosRefractor
Crusader
 
Posts: 27
Joined: 17 Mar 2018, 01:46
Has liked: 0 time
Been liked: 2 times
FAF User Name: ChaosRefractor

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest