Re: Script to Cycle Through Apps?
Re: Script to Cycle Through Apps?
- Subject: Re: Script to Cycle Through Apps?
- From: steve harley <email@hidden>
- Date: Wed, 20 Oct 2004 16:47:04 -0600
on 20 Oct 2004, at 11:57 AM, Marconi wrote:
Now, activating any given app is easy. What I don't know is how to get
a list of the running apps and randomly choose one to activate.
tell application "System Events"
set the_apps to application processes
set random_app to item (random number from 1 to length of the_apps)
of the_apps
set frontmost of random_app to true
end tell
note the frontmost property is listed as read-only, but it seems to be
modifiable.. also consider testing for faceless background, since these
can't come to front (though there is no error when i try)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden