# Windows automatic swapping

**URL:** <https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729>\
**Category:** Ignition\
**Created:** [September 19, 2018, 10:44am UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729 "2018-09-19T10:44:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rea\_21](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rea_21/32/7999_2.png) [@rea\_21](https://forum.inductiveautomation.com/u/rea_21)\
**Post date:** [September 19, 2018, 10:44am UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729/1 "2018-09-19T10:44:58Z")

</div>

Hi everyone! I need my client swap automatically between 5 Windows in few seconds,  
how can i manage this? I tried with a client script but I failed. Thank you for your help!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 19, 2018, 11:45am UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729/2 "2018-09-19T11:45:48Z")

</div>

For rotating displays like this, I follow this procedure:

- set all of the windows to open on startup.

- use a client tag as a pointer to which window should be on top (I use one called ScreenPointer)

- a client timer script to set the pointer:

```auto
pointer = system.tag.read('[Client]ScreenPointer').value

pointer += 1

if pointer > 5: #if max number of screens is 5
  pointer = 1
  
system.tag.write('[Client]ScreenPointer')

```

- on each window (this is not a root container property, you have to highlight the window name), set the layer property to either 1 if it needs to show or 99 if it doesn’t. For example, if it’s the third window:

```auto
if({[Client]ScreenPointer} = 3, 1, 99)

```

This method uses more client memory, because you’re opening all the windows at once, but the transitions are seamless.

---

<div class="post-metadata">

**Author:** ![rea\_21](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rea_21/32/7999_2.png) [@rea\_21](https://forum.inductiveautomation.com/u/rea_21)\
**Post date:** [September 19, 2018, 1:13pm UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729/3 "2018-09-19T13:13:58Z")

</div>

thanks for your help…could you be more specific on steps to follow for each Windows? thank you

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 19, 2018, 5:37pm UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729/4 "2018-09-19T17:37:04Z")

</div>

A demo to play with:

## [ScreenSwitchDemo\_2018-09-19\_1334.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/87b57f6f0924c95a19a1ea1a33becb9b4eaa8d1e.proj) (18.5 KB)

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c143186d5a2005059b9b571b417dd1a6af53f201.png)

---

<div class="post-metadata">

**Author:** ![Mahesh\_Madapathi](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mahesh\_Madapathi](https://forum.inductiveautomation.com/u/Mahesh_Madapathi)\
**Post date:** [February 12, 2019, 9:52pm UTC](https://forum.inductiveautomation.com/t/windows-automatic-swapping/19729/5 "2019-02-12T21:52:50Z")

</div>

Perfect. Just what I needed. Thanks Jordan.
