random number between 1 and 10

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

artefacti

random number between 1 and 10

Post by artefacti »

Hi,

I try to get a random number between 1 and 10 for selecting a random value out of an array.

But all the java-snippets I find in the web won´t function in photoshop.

For example this

Code: Select allRandom r = new Random();
int Low = 10;
int High = 100;
int R = r.nextInt(High-Low) + Low;

wrong usage of the reserved value int and other problems.

Can somebody help me?

BR
Michael
xbytor

random number between 1 and 10

Post by xbytor »

Your doing java. PS does JavaScript.