D
D
Dmitry Gedzyuk2021-04-06 17:02:35
JavaScript
Dmitry Gedzyuk, 2021-04-06 17:02:35

How to refer to AE composition width and height via JS?

var compName=prompt("Name Composition:");
var w=prompt("width");
if(compName!=null){
var newcomp = app.project.items.addComp(compName, 1920, 1080, 1, 15, 25);
}
I'm writing code, how can I make it so that the user can write the width and height himself through the prompt, and not I wrote in the code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2021-04-06
@Ht_JS

Good afternoon. Here is the code

const compName=prompt("Name Composition:");
const w=prompt("Set width");
const h=prompt("Set height");
if(compName!=null && w!==null && h!==null){
  var newcomp = app.project.items.addComp(compName, w, h, 1, 15, 25);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question