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

Scripts don't work

New Here ,
Nov 18, 2024 Nov 18, 2024

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

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?

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

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

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

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

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

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

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

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

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

In your code, I needed to add:

 

pal.show();

 

Are you using the same AE version on all computers?

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

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

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

Can you show us your updated code?

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

I added the polyfills.

 

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