• 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: startup disk question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: startup disk question


  • Subject: Re: startup disk question
  • From: Mr Tea <email@hidden>
  • Date: Fri, 20 Feb 2004 20:48:32 +0000

On 20 Feb 2004, at 6.56 pm, Robert Poland wrote:


Why does this work?
run script alias "iMac HD:Library:Scripts:Universal Scripts:SetSoundVolume"

and this doesn't?
run script alias "startup disk:Library:Scripts:Universal Scripts:SetSoundVolume" -- File not found


The second example doesn't work because the startup disk is almost certainly not called "startup disk". You need to get the name of the startup disk and insert it into the path.

But, if you want to run the same script on several machines you're probably going about this the wrong way. AppleScript includes various commands that can help you in situations where a script needs to go to a specific place on a non-specific computer.

What you might want to look at here is the 'path to' command in the 'file commands' section of the Standard Additions OSAX. This has shortcuts that will take you directly to several folders that are part of the basic Mac OS setup, and one of these is the scripts folder.

So, if you know that the file 'SetSoundVolume' exists in a Universal Scripts folder inside the Scripts folder in the global Library folder, this will find it and run it for you...

set scrptFolder to path to scripts folder from local domain
set scrptPath to "" & scrptFolder & "Universal Scripts:setSoundVolume" as alias
run script scrptPath


HTH


Nick
pp Mr Tea
_______________________________________________
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.

References: 
 >startup disk question (From: Robert Poland <email@hidden>)

  • Prev by Date: Iterating over a set of FMP records with Applescript
  • Next by Date: Re: Where to report Script Editor bug?
  • Previous by thread: Re: startup disk question
  • Next by thread: Re: startup disk question
  • Index(es):
    • Date
    • Thread