# Windowed Client Start Position

**URL:** <https://forum.inductiveautomation.com/t/windowed-client-start-position/18764>\
**Category:** Ignition\
**Created:** [July 8, 2018, 12:53am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764 "2018-07-08T00:53:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 8, 2018, 12:53am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/1 "2018-07-08T00:53:26Z")

</div>

A client has a large 4K monitor they are using for cameras, with a 1920x1080 area for their Ignition client in the bottom right. I can set the size of the client, but how can I set the launch position coordinates to the bottom right, instead of default top left?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 9, 2018, 2:35pm UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/2 "2018-07-09T14:35:52Z")

</div>

There’s no way to do this (directly) within the NCL’s settings. Two possible approaches:

1. Some 4k monitors have the capacity to ‘fake’ being four separate monitors to the driving OS; if your monitor/drivers support that, then you can just set the correct screen index in the launch params (make sure to use the NCL or clear your Java cache if using webstart).
2. Depending on OS, there are definitely external tools capable of driving a position change; for Windows AutoHotKey is a powerful, albeit somewhat convoluted, scripting language capable of a variety of tasks. You could have an Ignition client startup script run an AutoHotKey script with system.util.execute. Other OSes (Linux especially) undoubtedly have options; that’s just the one I’m familiar with on Windows.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 10, 2018, 6:47am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/3 "2018-07-10T06:47:40Z")

</div>

Thanks Paul. I’ll look at using AutoHotKey. From your answer though, I assume it’s not possible to move around the client window via a Jython script on client launch?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 10, 2018, 2:25pm UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/4 "2018-07-10T14:25:51Z")

</div>

From some searching around, it looks like it might be possible to `setLocation()` on the parent JFrame containing the entire client, but it’s not something I’ve ever experimented with. If you decide to do some experimentation, I’d recommend using [SwingUtilities](https://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#getRoot(java.awt.Component)) to help get the root frame.

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [April 8, 2019, 8:07am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/5 "2019-04-08T08:07:40Z")

</div>

Just in case anyone else is looking, I found this works:

```auto
# set the location of the Ignition Client window
from javax.swing import SwingUtilities
def SetLocation(left=100, top=200):
	
	allWindows = system.gui.getOpenedWindows()
	if len(allWindows)==0:
		#No Windows open? open one first
		system.nav.openWindow("Main")
		allWindows = system.gui.getOpenedWindows()
	
	topWindow = SwingUtilities.getAncestorOfClass(Window, allWindows[0])
	
	topWindow.setLocation(left,top)

```

---

<div class="post-metadata">

**Author:** ![Onejk](https://avatars.discourse-cdn.com/v4/letter/o/a587f6/32.png) [@Onejk](https://forum.inductiveautomation.com/u/Onejk)\
**Post date:** [June 22, 2021, 10:19am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/6 "2021-06-22T10:19:48Z")

</div>

I know this may be a stupid question but where did you run this script? Also doesn’t it still go to top left as it is written?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 22, 2021, 10:23am UTC](https://forum.inductiveautomation.com/t/windowed-client-start-position/18764/7 "2021-06-22T10:23:22Z")

</div>

Probably on the window’s startup event, can’t recall the name 🤔  
Client is positioned at left=100 top=200
