automator pause for random time

Okay, I am trying to set up a tethered camera type of deal that randomly takes pictures every 5-15 seconds.

Question #1
Is there a way to specify the random number variable to remain within a range of specific numbers, so for example it will only generate numbers 5-15?

Question #2
How can I take the number in the random variable and use it as the time in the "Pause" function?

Question #3
Or is there some easier way to accomplish what I am trying to do?


If I get this working, it'll basically be...
Take Picture>
Pause (here is where I need the help! User uploaded file)>
Loop for 15 minutes then end>
Additional Loop, this time asking if you want to start from the beginning>

Download Pictures>
Import Files into iPhoto.


Any help is much appreciated User uploaded file

Message was edited by: kahnikaze

MacBook Pro 2.4 GHz 4 GB RAM, Mac OS X (10.5.1), Logic Studio, MOTU Traveler

Posted on Sep 22, 2008 1:18 PM

Reply
3 replies

Sep 22, 2008 1:27 PM in response to kahnikaze

to pause for a random time as you want use the following apple script action instead of the pause action

<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on run {input, parameters}

set x to random number from 5 to 15

delay x

return input
end run</pre>

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

automator pause for random time

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.