Client startup script to open project maximized or window?

I’d like to open a project maximized or in windowed mode depending on what physical client is opening the project. Is that possible to script that in a client startup script??

You can compare to physical client host names to determine which physical client is opening the project. Our clients default to opening in windowed mode, but on full-time HMI computers we use the native client launcher to open them in full screen exclusive mode. This covers our needs for opening some clients full screen and others in windows, but if that method doesn’t cover your needs, you could probably accomplish this by accessing the window’s JFrame. To get you started, the below code maximizes the parent window of the calling event:

from javax.swing import SwingUtilities
from javax.swing import JFrame
parentWindow = system.gui.getParentWindow(event)
parentJFrame = SwingUtilities.getRoot(parentWindow)

Hmm…I worded my original post incorrectly. I’m looking to launch my full-time HMI computers in Full Screen, not a maximized window. Are you running full screen with the native client launcher method?

You won’t be able to launch a true ‘Full Screen’ client within a client startup script - there’s a variety of things that are fundamentally different between fullscreen and windowed clients.

Yes. We have a shortcut something like this set to run on startup on the full-time HMI computers:

C:\data\IgnitionClientLauncher\clientlauncher.exe project=projectName windowmode=fullscreen gateway.addr=IP:8088:8043

Then we use a client startup script check hostname and open the appropriate HMI window(s) and, where relevant, desktops for the particular client.