Skip to main content
Inspiring
July 8, 2020
Question

Same PR version, same code, different PCs: the script doesn't work in the same way

  • July 8, 2020
  • 1 reply
  • 777 views

PR Version: 14.0.3 build 1 for both PCs (desktop and laptop).

Some examples:

Laptop: if i use "confirm" in the code, i get a "NaN undefined" in the next steps. (instead, with an alert, it works, but i need a confirm)

Desktop: the "confirm" works fine.

===============

Laptop: based on my last post ( https://community.adobe.com/t5/premiere-pro/interpreting-aep-and-aegraph/td-p/11249074?page=1 ), the interpretation works fine.

Desktop: the interpretation is not maintained

 

I can't figure out the issue. Windows is updated, java is updated. I also don't know what machine i have to trust to finish the code.

Any idea?

 

Thanks

 

 

This topic has been closed for replies.

1 reply

Bruce Bullis
Legend
July 8, 2020

Can I have an ExtendScript snippet, that fails one place and works another?

Cad81Author
Inspiring
July 8, 2020

Yep! 

This is the "confirm" that works on desktop, but not on the laptop (updated both 1 hour ago to latest build)

var response = confirm("I will process the sequence '" + mainSequence.name + "'");
		if (response == false) {
				return 0;
			}

 and this is the "restore interpretation" that works on laptop but doesn't on the desktop:

	for(var s = 0; s < video.length; s++) {
		filetype = video[s].projectItem.name.slice((video[s].projectItem.name.length)-3);
		
			if ((footageint[s] != 0) && (!video[s].projectItem.isOffline()))
				video[s].projectItem.setFootageInterpretation(footageint[s]);					
	}

- video[] contain all the clips that require the interpretation 

- footageint[] contain the interpretation to apply to the original clips

 

Thank you

Bruce Bullis
Legend
July 8, 2020

Your call to confirm() doesn't have enough parameters; it should never work. 
Here's a working example:

var destroyExisting = confirm("A file with that name already exists; overwrite?", false, "Are you sure...?");

 
Calling your version from within VSCode, I get: 

Runtime Error: Error Code# 1: Not Enough Parameters @ file '~/estk/hack.jsx' [line:3, col:NaN]