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

Automation Blocks : Is there a way to force stop a script?

New Here ,
Jan 18, 2024 Jan 18, 2024

Hello,

 

I built a script that checks a variable. If the variable is OK, the script continues but if it's not, I would like to stop the script. Is it possible?

 

I noticed that some UI blocks could do it (open file dialog, save dialog, ...) but I'm looking for a simpler block (just the "stop script" function).

CleanShot 2024-01-18 at 15.21.18.png

The only workaround I've found so far is to prompt an alert and intentionally provoke an error (but it's not the cleanest solution 😅)...

TOPICS
Scripting
560
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 , Jan 18, 2024 Jan 18, 2024

Hi Robin,

there is no "stop script execution" block, but instead you can

1) put your entire script code into a function block

2) return from that function whenever you want to stop script execution.

 

I just recorded this tutorial for you to explain it in full detail:

 

PS: If anybody reading this wonders what Automation Blocks is: It is a (paid) extension to create custom tools and automations for Adobe Premiere Pro and After Effects.

 

Translate
Community Expert ,
Jan 18, 2024 Jan 18, 2024

Hi Robin,

there is no "stop script execution" block, but instead you can

1) put your entire script code into a function block

2) return from that function whenever you want to stop script execution.

 

I just recorded this tutorial for you to explain it in full detail:

 

PS: If anybody reading this wonders what Automation Blocks is: It is a (paid) extension to create custom tools and automations for Adobe Premiere Pro and After Effects.

 

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
New Here ,
Jan 18, 2024 Jan 18, 2024
LATEST

Very interesting! Thank you so much for your help! 🙏

 

(I struggled a bit because I have a lot of functions and loops, but I finally managed to get it done!)

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