• 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
Paths that work fine from AS don't work when launched from the command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Paths that work fine from AS don't work when launched from the command line


  • Subject: Paths that work fine from AS don't work when launched from the command line
  • From: Mike <email@hidden>
  • Date: Thu, 13 Sep 2007 19:27:58 -0700

I have a simple AppleScript that sets a variable to the name of an app I want to launch. If the app is not found, it gives an error.

When I run this script from the Finder or in Script Editor it works fine.

However, when I execute it from a shell script using osascript, the error shows up telling me it can't find the app I want to launch.

Is there some environment variable present in the OSA system that I need to set in my script in order for it to find the app?

Here is my script:

set codeWariorIDE to "CodeWarrior IDE"

try
set codeWariorIDEFullPath to path to application codeWariorIDE
on error
error "Can't find the Codewarrior application! Please make sure CodeWarrior Pro 8 is installed." number 1
end try


Thanks,

Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Paths that work fine from AS don't work when launched from the command line
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: A Different Rsync Question
  • Next by Date: Re: Taking iChat offline
  • Previous by thread: Re: Taking iChat offline
  • Next by thread: Re: Paths that work fine from AS don't work when launched from the command line
  • Index(es):
    • Date
    • Thread