I have a script that gets keyboard input. I want the script to be terminated when the stop button is pressed. I am using simulation context’s is_playing() to enter my stop_script() function, but I do not know what to do inside the stop_script() function, so that the keyboard subscriptions and the script is terminated.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to stop running infinite loop program launched from Script Editor? | 2 | 405 | March 1, 2023 | |
Trigger "play" and "stop" using python scripts in script editor possible? | 3 | 437 | December 2, 2023 | |
How to keep a standalone script running after calling SimulationApp.close() | 1 | 5 | April 29, 2025 | |
Handle stop button pressing from Extension | 0 | 122 | May 13, 2024 | |
Play simulation through python scripting extension | 2 | 757 | October 2, 2023 | |
While using Python Script ,how to reset a variable after stop button is pressed | 2 | 479 | December 8, 2022 | |
How kill subprocess.popen when the stop button is pushed | 5 | 771 | April 14, 2023 | |
Python Scripting issue | 2 | 259 | August 25, 2023 | |
Bug: Unable to interrupt Python script after starting SimulationApp | 0 | 240 | April 18, 2024 | |
Press a key on keyboard using Python script | 3 | 612 | December 27, 2023 |