Re: Get Random number?
Re: Get Random number?
- Subject: Re: Get Random number?
- From: Rob Stott <email@hidden>
- Date: Wed, 15 Aug 2007 09:58:58 +0100
On 14 Aug 2007, at 22:05, Jakob Peterhänsel wrote: Anyone have a method to get a random number in AS?
Hi Jakob
You're going to kick yourself...
set theNumber to random number
...that gets you a decimal so you might want to multiply it and/or add something to get the value you want
eg.
set theRandomNumber to (random number) * 10
...or even...
set theRandomNumber to round ((random number) * 10) rounding up
Hope that's of some help.
r.
Important: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of the communication is strictly prohibited. If you have received this communication in error, please notify the writer immediately by telephone and return the original message via postal service to the writer's attention at the above address. Thank you.
Watt Gilchrist Limited. Albion Mills, Albion Road. Bradford, BD10 9TQ
Registered in England
873405
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden