Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
How do I Wait With Extends Script (Adobe)

i'm currently working on an extends script which is the technology that we can use to create extension for adobe softwares, its a javascript similar script language Im working on a script to automate some boring and repetitive tasks

Here is my problem i've to wait the creation of a bin before use a variable which call this bin but i can't, i tried

.then( Promise => { //Some Code }) ; setTimeout(Function(), time); nothing is working

Can someone help me please ? Here is my code

    root = app.project.rootItem
    newFilesPath = "Path"
    newFilesBin = root.children[0]
    
    app.project.importFiles(newFilesPath, true, newFilesBin, false)
    
    app.project.save()
    
    for(i=0; i<newFilesBin.children.numItems; i++){  //here is the problem it tells me that
        newFile = newFilesBin.children[i]            //newFilesBin is null, i think he has not the 
                                                     //time to create the file and then to put it 
                                                     //in the variable
        name = newFile.name
    
        newTiktokBin = root.createBin(name)
    
        root.children[i].children[0].moveBin(newTiktokBin)
    }

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can simply send your program to sleep for any amount of milliseconds by using the $.sleep() method.

$.sleep(1000);  // sends the program to sleep for a second

There is no such thing as .then() or promises in ExtendScript, as it is basically an ancient version of JavaScript.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!