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

Scripts don't work

New Here ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

I had this problem. I wrote several scripts, they worked successfully, at one point some functions stopped working, for example, when you click on a button nothing happens.
Moreover, the same script works on another computer.
I turned off the antivirus, ran After Effects with admin rights, nothing helps.
Help, because I don't know what to do anymore

TOPICS
Expressions

Views

293

Translate

Translate

Report

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Could it be that somewhere the script was entered as unwanted and that's why it's not working now? Do you know how to solve this problem?

Votes

Translate

Translate

Report

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
Advocate ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Do you have an example of code that isn't working?

Votes

Translate

Translate

Report

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

I don't think the problem is with the code, as everything works on another computer.

Votes

Translate

Translate

Report

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
Advocate ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

The trim() and indexOf() method aren't supported in all versions, you need to use a polyfill.

 

String.prototype.trim = function() {
    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
    }

Array.prototype.indexOf = function ( item ) {
    for (var index = 0 ; index < this.length; index++ ) {
        if ( this[index] === item )
            return index;
    }
    return -1;
}

 

funny trim() isn't supported in AE 2025 but it's supported in AE 2024 and Beta.

screenshot.png

Votes

Translate

Translate

Report

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Screenshot_1.png

 

This is a situation that I don't understand. Yesterday everything worked, today I came, didn't make any changes, and the script no longer works. This happens not only with this script.
If you run it from the directory Adobe\Adobe After Effects 2024\Support Files\Scripts\ScriptUI Panels, the script opens, but does not respond to button presses.
If you run it through adobe extendscript toolkit, the script does not start at all.

But at the same time, on another computer, the same script works perfectly.

I have never encountered such a thing, so I don't even know what to do, my head is exploding

video
https://dropmefiles.com.ua/ua/zm3R

Votes

Translate

Translate

Report

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
Advocate ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

In your code, I needed to add:

 

pal.show();

 

Are you using the same AE version on all computers?

Votes

Translate

Translate

Report

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

I added everything you advised, but unfortunately when I click the button nothing happens :((

On one computer where everything works AE 23 and AE 24, it works on both versions.
On another computer there are also two versions but it doesn't work on either.

I have a feeling that somewhere the execution of the code itself is blocked

Votes

Translate

Translate

Report

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
Advocate ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Can you show us your updated code?

Votes

Translate

Translate

Report

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

 

Votes

Translate

Translate

Report

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
Advocate ,
Nov 19, 2024 Nov 19, 2024

Copy link to clipboard

Copied

LATEST

I added the polyfills.

 

Votes

Translate

Translate

Report

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