Launch Machines Simulator at fullscreen on a second monitor

Started by Derrick, August 27, 2012, 04:03:18 PM

Previous topic - Next topic

Derrick

Steps:
1. download & install AutoHotkey from http://www.autohotkey.com/

2. create a file called "start.ahk" in the Machines Simulator directory.

3. Run Machines Simulator and set the windowed resoloution to the full screen resoloution of the second monitor.  Then quit Machines Simulator.  Failure to do this will cause the aspect ratio to be distorted.

4. copy the following text into that file:

SetTitleMatchMode, 3
Run, MachinesSimulator.exe, , , PID
WinWaitActive, ahk_pid %PID%, , 60
WinMove, %A_ScreenWidth%, 0
WinSet, Style, -0xC00000, ahk_pid %PID%
WinMaximize, ahk_pid %PID%
5. save and run "start.ahk"  Optionally you can right-click on "start.ahk" and select "Compile Script" and then run the newly created "start.exe"  This will launch Machines Simulator, remove the window border and move it to the second monitor, simulating fullscreen.

Derrick

Forgot to mention that you need leave the Machines Simulator Full Screen option turned off.

The script will simulate a Full Screen.  Leaving full screen on will cause Machines Simulator to minimize everytime you use the primary screen.

EasyPLC_Master

Hello Derrick.
Thanks for your post!.
I have tested your method but doesn't work on my computer, I have connected a second monitor (expanding the desktop) and your script makes that Machines Simulator appears Maximized always on the primary screen.

When I need to run Machines Simulator on a secondary monitor I used to do the following procedure:
Run Machines Simulator, by default always is running on the primary monitor.
If you have the fullscreen option, uncheck it.
Drag the Machines Simulator window to the second monitor (this is for expanded monitor configurations), and then check again the fullscreen option.
Then Machines Simulator will run in fullscreen mode on the secondary monitor.

Regards.

Derrick

Strange, I would suggest to try changing %A_ScreenWidth% to the horizontal resolution of your screen.  Do not use the %% around the number.

AutoHotkey also installed a program called "AutoIt3 Window Spy"  You can put a window on the second screen and use "AutoIt3 Window Spy" to read the screen position value.  The top left corner will be X,Y  where X is the width of your primary monitor and Y = 0.


Run, MachinesSimulator.exe, , , PID              ->  runs the program and gets the program ID
WinWaitActive, ahk_pid %PID%, , 60            ->  waits for the program to load
WinMove, %A_ScreenWidth%, 0                   ->  moves the program by the width of the main screen
WinSet, Style, -0xC00000, ahk_pid %PID%   ->  removes the window border
WinMaximize, ahk_pid %PID%                      -> maxamizes the program

Make sure to set the Machines Simulator options to the size of the second screen and don't use fullscreen.


If I try it your way, every time I click the mouse outside of the Machines Simulator screen, then Machines Simulator minimizes.  With my script, Machines Simulator always stays running.