Skip to main content
Bed30321077z973
Inspiring
November 4, 2023
Answered

Scripting: running the code slowly (with PAUSEs?)

  • November 4, 2023
  • 1 reply
  • 329 views

I am aware about the ability to add break points in visual code for example..

 

I would like for a different approach,

I am running a script that does multiple things during a short amount of time,

I would like it to "pause", between certains lines of the code to be able to watch what's happening,

 

I tried javascript codes, but they did not work:

// sleep(1000);
// setTimeout(() => { console.log('World!'); }, 1000);

-> errros. Not all javascript codes work on jsx & extendscript right? I wonder what are the rules to know which functions work and which don't?

 

I tried to check the docs and found: PAUSEGROWING

https://ppro-scripting.docsforadobe.dev/general/project.html?highlight=pause#project-pausegrowing

But I feel this is not it, not sure what or how to use it.

 

Is there any way to achieve what I want? Apply regular automated pauses during the code running?

Thanks

 

This topic has been closed for replies.
Correct answer bbb_999

You needed a '$' first; this works.

 

$.sleep(10000); 

1 reply

bbb_999
Community Manager
bbb_999Community ManagerCorrect answer
Community Manager
November 4, 2023

You needed a '$' first; this works.

 

$.sleep(10000);