# Dual Monitor Startup Script

**URL:** <https://forum.inductiveautomation.com/t/dual-monitor-startup-script/5998>\
**Category:** Ignition\
**Created:** [March 9, 2013, 6:04am UTC](https://forum.inductiveautomation.com/t/dual-monitor-startup-script/5998 "2013-03-09T06:04:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![djones](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@djones](https://forum.inductiveautomation.com/u/djones)\
**Post date:** [March 9, 2013, 6:04am UTC](https://forum.inductiveautomation.com/t/dual-monitor-startup-script/5998/1 "2013-03-09T06:04:39Z")

</div>

Okay, check this out. Here is some code to pass parameters from command line switch to client tags. Then use the client tags in ignition. In Version 7.4 and beyond the startup parameters are mapped to client tags in the root directory directly. Then using the startup script below, the command line parameters open the window (also a parameter – DW) in a specific position.

By changing the target in the shortcut to include the parameters, you may launch the same project however have it open to 2 different screens on independent location (or monitors)

Example

```
Shortcut #1
	[code]C:\Windows\SysWOW64\javaws.exe http://localhost:8088/main/system/launch/client/Test_App.jnlp?DW=Window1&X=0&Y=0&H=1080&W=1920[/code]

	This opens on monitor 1 to “Window 1”

Shortcut#2
	[code]C:\Windows\SysWOW64\javaws.exe http://localhost:8088/main/system/launch/client/Test_App.jnlp?DW=Window3&X=1921&Y=0&H=1080&W=1920[/code]

	This shortcut opens to monitor 2 to “Window 3”

```

This would allow us to create 2 shortcuts in the start menu to the same project, launching 2 separate clients (both to the same project) and allow us to dictate their position.

[code]from javax.swing import SwingUtilities,JFrame  
from java.awt import GraphicsEnvironment,Rectangle

Default = system.tag.read("[Client]DW")  
X=system.tag.read("[Client]X")  
Y=system.tag.read("[Client]Y")  
H=system.tag.read("[Client]H")  
W=system.tag.read("[Client]W")

if Default.value != ‘’:  
window = system.nav.openWindow(Default.value)  
frame = SwingUtilities.getAncestorOfClass(JFrame, window)  
frame.setBounds(X.value,Y.value,H.value,W.value)  
[/code]

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 9, 2013, 6:55pm UTC](https://forum.inductiveautomation.com/t/dual-monitor-startup-script/5998/2 "2013-03-09T18:55:11Z")

</div>

Thanks for sharing that! That will help out a lot of people.
