# Available user inputs for Popup dialog in urscript

**URL:** <https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553>\
**Category:** Product Wishlist\
**Created:** [November 3, 2020, 8:56am UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553 "2020-11-03T08:56:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hi11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/hi11/32/2179_2.png) [@hi11](https://forum.universal-robots.com/u/hi11)\
**Post date:** [November 3, 2020, 8:56am UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/1 "2020-11-03T08:56:31Z")

</div>

# Summary

For simple urscript programs it would be very convenient to have more flexible user input options via Popup dialog windows. Right now it’s only able to block execution and select either Stop or Continue. Possibility to have at least 2 choices like Stop, A or B, and numeric inputs like “N times” would allow for very fast and flexible development of programs.

# What is it?

We have some processes where we would like the user to be able to skip or redo some steps at some specific breakpoints in the program, and select if not skipping how many times to execute something. We know we could use Digital Inputs or more complex types of hardware inputs but it would be much more simple to have this directly on the Teach Pendant.

Currently the Popup dialog is the only way to have some sort of user interaction with the control flow of the program, but it only can work as a simple pause by blocking until pressing Continue. It would be very convenient if the popup dialog was able to return some information if it was also possible to declare more input choices besides Stop and Continue. Even something just as simple as Stop, Option A, Option B, or Stop, N times, Skip (with numeric input and selectable range ie 1-5 times).

# Why is it needed?

This would save a lot of time to be able to do this directly on screen so that operators can pick what they need to do, skip tasks if unnecessary and set a number of times for a process to run. I know it might be possible to do this from URCaps but being able to integrate this directly from a post-processor to export urscripts is much more simple.

---

<div class="post-metadata">

**Author:** ![sam.verity-hilton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sam.verity-hilton/32/6046_2.png) [@sam.verity-hilton](https://forum.universal-robots.com/u/sam.verity-hilton)\
**Post date:** [November 3, 2020, 11:56am UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/2 "2020-11-03T11:56:31Z")

</div>

This is actually already possible! its just that for whatever reason the script commands required are not listed in the script manual. You’ll be able to see that the assignment program node has a few selectable options, for example you can select a boolean popup, integer popup etc. By adding these regular program nodes to a program, saving it, then checking the script file, you can actually find out the script commaneds for these improved popups. More information can be found here:

> [@Creating new lines with strings](https://forum.universal-robots.com/t/creating-new-lines-with-strings/4370/3):
>
> Thank you!! Formatting the string with html solved my needs. As for a yes/no popup, the only popups available URScript are those shown in the popup() command I used to demonstrate this. You will have to code your own if you want some yes/no functionality Actually this is not true. The popup() is the only command published in the script manual, but there are additional commands to do the float, integer, string, or boolean options that are not published. If you create these operator inputs w…

EDIT: its the assignment program node, not the popup program node

---

<div class="post-metadata">

**Author:** ![hi11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/hi11/32/2179_2.png) [@hi11](https://forum.universal-robots.com/u/hi11)\
**Post date:** [November 3, 2020, 12:06pm UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/3 "2020-11-03T12:06:06Z")

</div>

Ah wow that’s awesome! Yeah that script manual needs an update then 😉 Thanks a lot! will be trying out right now.

---

<div class="post-metadata">

**Author:** ![kaha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/kaha/32/5058_2.png) [@kaha](https://forum.universal-robots.com/u/kaha)\
**Post date:** [November 9, 2020, 10:38am UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/4 "2020-11-09T10:38:45Z")

</div>

Hello hi11, Sam,

It is not needed to use script code to achieve such functionality. The request from primary client function is being represented by assignment node with source as operator. It is standard Polyscope GUI functionality.

Please note: for any popup type (popup node, popup script, assignment by operator) you can set HTML formatting, to present message in clear form (as on above picture).

Hope it explains, that this functionality can be also achieved with simple built-in Polyscope program node.

---

<div class="post-metadata">

**Author:** ![hi11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/hi11/32/2179_2.png) [@hi11](https://forum.universal-robots.com/u/hi11)\
**Post date:** [November 9, 2020, 11:09am UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/5 "2020-11-09T11:09:41Z")

</div>

Hi Kaha,

The problem here is that I have some process-specific software generating a complete urscript file. The URP program on Polyscope is a simple script node importing this file, and during the machining operations there are some optional calibrations steps as well as optional selectable or skippable steps by the user. All is generated by the post-processor so I can’t have these Polyscope nodes come before or after the script node. What Sam described is exactly what I need: ability to block program execution while asking for user input for true/false or integer value, returning back to program execution and either skipping program blocks or using the integer value to adjust things, all embedded in a standalone urscript file.

So I am aware that this is doable from Polyscope nodes, but it’s also very handy to be able to do that directly from script.

---

<div class="post-metadata">

**Author:** ![kaha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/kaha/32/5058_2.png) [@kaha](https://forum.universal-robots.com/u/kaha)\
**Post date:** [November 10, 2020, 7:41pm UTC](https://forum.universal-robots.com/t/available-user-inputs-for-popup-dialog-in-urscript/9553/6 "2020-11-10T19:41:23Z")

</div>

Hello @hi11,

I’m glad to hear it is what you were looking for. It was just about to point out the proposed solution is just how ‘assignment from operator’ looks in the script level 😉 .
