# How to close a popup with script

**URL:** <https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366>\
**Category:** URScript\
**Created:** [March 14, 2023, 8:09am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366 "2023-03-14T08:09:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eikefranke](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@eikefranke](https://forum.universal-robots.com/u/eikefranke)\
**Post date:** [March 14, 2023, 8:09am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/1 "2023-03-14T08:09:29Z")

</div>

We want to close a Popup after time. This popup only give some informations and isn´t important for the running program

after some time we want to close this popup without clicking it or to use a dashboardserver (we dos not use some external divices)

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [March 14, 2023, 8:50am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/2 "2023-03-14T08:50:02Z")

</div>

You can connect to the internal dashboard server from within the robot program. This should allow you to close the popup. 🙂  
I made a quick example of closing a popup. Make sure the robot is in remote mode, if you’re using an e-series robot.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/b/b87ffede50f66bb5cf09da8fe82a0371ba34e6ea.png)

---

<div class="post-metadata">

**Author:** ![eikefranke](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@eikefranke](https://forum.universal-robots.com/u/eikefranke)\
**Post date:** [March 15, 2023, 7:44am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/3 "2023-03-15T07:44:13Z")

</div>

Thanks. It works well. and we use it without an extra Thread or event. We include it in the main program (we want to refresh a Popup so we close it befor open)

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [March 15, 2023, 8:10am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/4 "2023-03-15T08:10:30Z")

</div>

That’s good to hear. 🙂

The reason I put it in the thread, is because the popup pauses the main program. But sounds like you’re using it different.

---

<div class="post-metadata">

**Author:** ![eikefranke](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@eikefranke](https://forum.universal-robots.com/u/eikefranke)\
**Post date:** [March 15, 2023, 9:16am UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/5 "2023-03-15T09:16:24Z")

</div>

I open the Popup as a script and tourn off the setup to stopp the programm if the window open:

popup(str\_cat(zaehler," Döner"),“Gefertigte Baugruppen”)

str\_cat(zaehler," Döner") is the what shown in the window

“Gefertigte Baugruppen” is the Head of the popup

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/133627d21adfe5d24507d1ffedcdc37c49a43409.png)

---

<div class="post-metadata">

**Author:** ![robin\_gdwl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/robin_gdwl/32/2676_2.png) [@robin\_gdwl](https://forum.universal-robots.com/u/robin_gdwl)\
**Post date:** [May 8, 2023, 8:02pm UTC](https://forum.universal-robots.com/t/how-to-close-a-popup-with-script/27366/6 "2023-05-08T20:02:22Z")

</div>

you could also consider just using `textmsg()` instead of popups.  
It will put a message in the log, so you have a nice overview that shows what was finished at what time.
