Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

UI button to stop loop - Automation Blocks

Explorer ,
Aug 02, 2025 Aug 02, 2025

Hello all,

 

Is it possible to create a UI button to stop the loop in Automation Blocks?

 

- I have tried it with "repeat while + input of type checkbox"

- I also tried it with "repeat while true" and inside the loop I put an IF statement with "input of type checkbox" and inside a "break out of loop". 

 

I was hoping with the second method the state of the checkbox would get evaluated during each loop, which would be PERFECT, but unfortunately that didn't work either.

 

Any help or advice would be greatly appreciated.

TOPICS
SDK
242
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 07, 2025 Aug 07, 2025

Unfortunately not! There is no way to stop a script via Premiere Pro's scriptinng engine. Hence, also Automation Blocks cannot do that, unfortunately. Here I am limited by what the scripting engine itself is capable of.  

Translate
Community Expert ,
Aug 02, 2025 Aug 02, 2025

UI values are read before the script is executed and then inserted into the code as constants. So there is no way to interactively stop the script with a UI element. The best hack I could think of is creating some file or folder on your harddrive and make the loop check if the file still exists and stop otherwise. Then you can at least force-stop the loop by deleting the file.

You should also be able to add a confirm popup dialog  after each round of the loop (or say every 100 loops), like "do you still want to continue?"

For stopping scripts see also
https://community.adobe.com/t5/after-effects-discussions/automation-blocks-is-there-a-way-to-force-s...

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 03, 2025 Aug 03, 2025

Thank you for your reply Mathias.


Would it be possible to create a block that evaluates (the checkbox value) at every loop?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2025 Aug 03, 2025

No, there is no way to access the input values dynamically at runtime.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 06, 2025 Aug 06, 2025

Could you please implement a button next to the "Run" button, which is a "Stop" button? 

That would solve this problem perfectly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2025 Aug 07, 2025

Unfortunately not! There is no way to stop a script via Premiere Pro's scriptinng engine. Hence, also Automation Blocks cannot do that, unfortunately. Here I am limited by what the scripting engine itself is capable of.  

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 09, 2025 Aug 09, 2025
LATEST

Hi @GEdit 

 

Henrique here from TMMW.

I had to implement a similiar solution for a client and the workaround was

checking for a file in the system and using that to stop the loop.

 

Feel free to reach out.

henrique@themachinemustwork.com

 

Henrique \\ TMMW
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines