image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old September 21st, 2004, 01:28 AM
mr. k's Avatar
Registered User
 
Join Date: Oct 2002
Location: mpls. mn
Posts: 1,408
Thanks: 0
Thanked 0 Times in 0 Posts
mr. k is on a distinguished road
Applescript Help

I made an applescript today to launch a few of my favorite applications:

Code:
set the app_list to {"iTunes", "Mail", "Safari", "Terminal"}

set the app_count to the count of the app_list
repeat with i from 1 to the app_count
	set this_app to item i of the app_list
	tell application this_app to activate
end repeat
But I really don't know anything about applescript, and the above script is abhorrently slow. It starts launching the first, then waits for it to launch completely, then starts launching the next, and for some reason never launches terminal.

How can I get it to open up everything at the same time? And are there any stupid errors my code that keep terminal from launching? Any help you guys have I would love.
__________________
iMac G3 600Mhz, 256MB RAM, 40GB HD, 10.3.5
20GB iPod (Click Wheel) w/ Griffin iTrip // AIM:kjell05
Reply With Quote
  #2  
Old September 21st, 2004, 04:29 PM
NSCoder
 
Join Date: Oct 2002
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
anarchie is on a distinguished road
Ooh, this is a good one, thanks. Took me a second to find in the Applescript Language Guide.

Code:
set the app_list to {"iTunes", "Mail", "Safari", "Terminal"}

ignoring application responses
  repeat with i in app_list
    tell application i to open
  end repeat
end ignoring
Reply With Quote
  #3  
Old September 22nd, 2004, 08:17 AM
mr. k's Avatar
Registered User
 
Join Date: Oct 2002
Location: mpls. mn
Posts: 1,408
Thanks: 0
Thanked 0 Times in 0 Posts
mr. k is on a distinguished road
Thanks a million, anarchie!
__________________
iMac G3 600Mhz, 256MB RAM, 40GB HD, 10.3.5
20GB iPod (Click Wheel) w/ Griffin iTrip // AIM:kjell05
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 09:16 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.