Name
some
Syntax
tell app "Sherlock 2" to get some channel
Description
some
returns a random object from a container.
This might be useful if you are randomly selecting images for display
from a directory. The script could state:
set ranImg to some file of folder "images" where (name ends with ".gif")
The ranImg
variable would then be set to a random
.gif file that is stored in the
images folder. The return results are in any
event far less predictable than specifying files by name or property
values.
Get AppleScript in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.