Skip to main content
Participant
February 3, 2021
Question

Problem with how many times evalScript can be called in a row

  • February 3, 2021
  • 0 replies
  • 150 views

Hello!

 

I have a simple panel which needs to call the evalScript method a few hundred times, however seemingly I can only call it around 50 times in a row.

 

If for example I try with a very simple script such as:

    for(let i=0; i<100; i++){        
        csInterface.evalScript(`alert("${i}")`)
    }

Instead of having 100 alerts (as expected) I have around 50 (sometimes 48, sometimes 45...).

 

I know that for that particular script it would be easier to just include the bucle in the .jsx file, so please keep in mind is just a sample script to explain what my problem is.

 

There are other situations in which I, as an unexperienced developer, find more convenient to call the evalScript method as many times as wanted.  

 

So, do you know any way to change/avoid that limit?

Thanks a lot for your help!

 

    This topic has been closed for replies.