• 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: Wierd "can't find..." error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wierd "can't find..." error


  • Subject: Re: Wierd "can't find..." error
  • From: daniel <email@hidden>
  • Date: Sun, 14 Nov 2004 11:04:15 -0800

You're using a relative path. Probably it works fine from anything that executes the script as saved from Script Editor, because it's turning it into an alias and saving it as one. When you try to run it from cron (through osascript?) you're relying on whatever the working directory of cron is at the time.

Try something like this:

run script posix path "/Library/Scripts/Universal Scripts/SetSoundVolume" as alias

If you save that in Script Editor, it will switch the path to HFS style, which hardcodes the volume name. So just make sure it's "posix path" style for the cron script.

Daniel

On Nov 14, 2004, at 6:20 AM, Robert Poland wrote:

Hi,

I have a script with the first line
run script ":Library:Scripts:Universal Scripts:SetSoundVolume" as alias


All of the sudden I keep getting the error "Can't find the file "SetSoundVolume".

This only happens when the calling script is called from Cron. If I re-run the script it works fine.

I have; gone to the file and re-saved it, moved it out of the folder and back, tried dropping it into the calling script and re-enter the calling line.

OS 10.3.6 on a iMac 800, FP.
I used Cocktail to update the whatis data base and the locate data base.
I have run DiskWarrior 3.0.2 recently.


Any suggestions?

Tia,
-- Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: Wierd "can't find..." error
      • From: daniel <email@hidden>
References: 
 >Wierd "can't find..." error (From: Robert Poland <email@hidden>)

  • Prev by Date: Looking for Hamish and MySQL for AppleScript
  • Next by Date: Re: Looking for Hamish and MySQL for AppleScript
  • Previous by thread: Wierd "can't find..." error
  • Next by thread: Re: Wierd "can't find..." error
  • Index(es):
    • Date
    • Thread