• 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: 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]

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


  • Subject: Re: Paths that work fine from AS don't work when launched from the command line
  • From: Kevin Bradley <email@hidden>
  • Date: Thu, 13 Sep 2007 23:17:53 -0500

Mike,

Works OK for me (I changed CodeWarrior to XCode, since that's what I use, and it works fine in Script Editor and in a Terminal window using osacompile.

You might look for another reason - "warrior" is misspelled in the variable names as "warior," though that shouldn't cause a problem.

Kevin Bradley
email@hidden
http://macscripter.net

On Sep 13, 2007, at 10:54 PM, email@hidden wrote:

Subject: Paths that work fine from AS don't work when launched from

the command line

To: Applescript Users <email@hidden>

Message-ID: <email@hidden">email@hidden>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed


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: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: A Different Rsync Question
  • Next by Date: Re: rsync do shell script password..
  • Previous by thread: Re: Paths that work fine from AS don't work when launched from the command line
  • Next by thread: Re: Paths that work fine from AS don't work when launched from the command line
  • Index(es):
    • Date
    • Thread