# Opening a new desktop from tab strip

**URL:** <https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 6, 2022, 1:57pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285 "2022-12-06T13:57:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [December 6, 2022, 1:57pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285/1 "2022-12-06T13:57:43Z")

</div>

I'm using a tabstrip for navigating my client. I'd like to make a second desktop open when one of the tabs is pressed. I'm using this script during the mouseClicked event, but the new desktop doesn't open.

```auto
if event.source.selectedTab == 'Annunciator':
	system.gui.openDesktop(screen=0, handle="Annunciator", windows=["Annunciator/Main"])

```

---

<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:** [December 6, 2022, 4:35pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285/2 "2022-12-06T16:35:34Z")

</div>

Are there any errors in the client logs? Where are you testing from? Are you sure your `if` condition is being met? Maybe the selected tab value has a trailing space, or something like that.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [December 6, 2022, 7:17pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285/3 "2022-12-06T19:17:42Z")

</div>

It looks like `if` condition is not being met. I copied and pasted the name of the tab into the script to make sure there weren't any typos, but it's still a no go.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [December 6, 2022, 7:29pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285/4 "2022-12-06T19:29:38Z")

</div>

`selectedTab` returns the configured window name of the selected tab, not the display name. Try copying the value in the window name field into your `if` statement and see if that works.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [December 6, 2022, 7:45pm UTC](https://forum.inductiveautomation.com/t/opening-a-new-desktop-from-tab-strip/67285/5 "2022-12-06T19:45:17Z")

</div>

That did it. Now that it works, I see that it's not exactly the behavior I was looking for, but I have something to work off of now.
