Call up random numbers

Is it possible to call up random numbers of 3 or 4 digits by clicking a button?
Let me explain: different digits appear each time I click on the same button.
Is it possible to accomplish this with Active Presenter? Thank you very much!

Call up random numbers

Random number generation can be done using JavaScript.

For example, you might do something like this for a number between 1 and 100


To generate a new random 3 or 4 digit number - you could use a strategy such as this.

On Slide Load

window.randomNumber = function(min, max) {
  return Math.floor((Math.random()*(max-min)+min))

On your button


If you have a shape on the slide to display your variable - you should see a new 3 or 4 digit number each time.

You can replace the minimum and maximum values as desired.

Hope this helps.

I am working on the intermediate JavaScript guide which includes a little discussion of random number generation as well. Be on the lookout for that to be posted in the next week.


WOW…you are a force Greg, thank you so much!
I have read more of your posts and have been fascinated.
Thank you from the bottom of my heart for your time and congratulations on your brilliance. :pray: