Home› Programming
Discussion
Back to discussions page
fihcnc
Posts: 8 Apprentice
check if a prompt or blocking popup is shown? |
107 views
|
Answered | |
/ Most recent by fihcnc
in Programming
|
4 comments |

in Programming
Is there any way to check if the robot has paused execution of the main thread due to a prompt or popup?
Obviously I can set a bool to true before the popup and low afterwards, but this gets really tedious when the program gets long.
Obviously I can set a bool to true before the popup and low afterwards, but this gets really tedious when the program gets long.
Tagged:
You could do something like this:
Make an assignment in the Before Start section of the program and name the variable popupShowing and set it to False
Create a script file with the following code:
Then when you call this the variable will go True, once the user acknowledges the popup the variable will go False.
In the function definition you will see that one of the arguments, title, has a default value. You can call the function with either just a message (msg) or with a message and a title such as
You can learn more about scripts with UR by downloading the script manual from the help site.
How could I do this for operator prompts requiring either bool or int input?
You would then use it like this:
The available commands are