• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Telling a list of apps to activate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Telling a list of apps to activate?


  • Subject: Re: Telling a list of apps to activate?
  • From: Lachlan Deck <email@hidden>
  • Date: Wed, 29 May 2002 10:07:25 +1000

Hi there,

From: James Reynolds <email@hidden>

I have tried various methods to tell a list of apps to activate, and
I can't get dependable results. The following works with a vanilla
AppleScript compiled as an app, but it doesn't work when it is part
of a larger AppleScript Studio application.

set appList to {"iTunes", "Microsoft Word", "Microsoft Excel",
"Internet Explorer"}
repeat with i in appList
with timeout of 1 second
try
tell application i to activate
end try
end timeout
end repeat

It is failing at iTunes and I am assuming it is failing because it is
trying to ask where it is (however in AppleScript Studio, it does not
actually ask where the app is, it throws an error "No user
interaction allowed", which is what I am getting). Word, Excel, and
IE are launched without problem.

Have you tried:
property appList: {"iTunes", "Microsoft Word", "Microsoft Excel",
"Internet Explorer"}

repeat with i from 1 to number of items in appList
with timeout of 1 second
try
set this_app to (item i of appList)
tell application this_app
activate
end tell
end try
end timeout
end repeat

Works fine here - Mac OS X 10.1.4

Oh - and you'd better set Word and Excel to not show the project gallery at startup - otherwise they'll be going for Gold on the trampoline ;-))

Thanks,

James Reynolds
University of Utah
Student Computing Labs
email@hidden
801-585-9811

with regards,

--
Lachlan Deck
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Changing a button's icon
  • Next by Date: Script server as faceless background application?
  • Previous by thread: Telling a list of apps to activate?
  • Next by thread: Moving windows
  • Index(es):
    • Date
    • Thread