Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

orbdrums

macrumors member
Original poster
Dec 13, 2008
78
0
I wrote a few applescripts, saved them as .apps and ran them from "Terminal" with no problem. I'm not sure what changed but when I write new scripts and save them as .apps they will not run in "Terminal". I open Terminal manually and type in the path and bash returns "...is a directory". The following is an example of before and now.

/Users/username/Programming/Rng.app - When saved before it executes the app.

-bash: /Users/username/Programming/RnG.app: is a directory - Now it returns this message with no execution.

I would appreciate any help with this because it's driving me nuts...
 
I don't know what changed. Looks like before you were just creating binaries with a .app extension. You weren't creating proper MacOS application, which are indeed directories with a specific directory structure.

Either use the open command:

Code:
open /Users/username/Programming/Rng.app

or run the binary within the .app directory

Code:
/Users/usernames/Programming/Rng.app/Contents/MacOS/Rng
 
Wow. Thanks so much for your input. I was pulling my hair out and I don't have any left. open worked. As I'm sure you know, I'm new to Apple...
 
You also may want to look into osascript, it allows you to directly execute applescript from the terminal(or inside scripts).
 
I have looked at osascript and used it but my goal is to have an .app run at different times throughout the day. I downloaded "Lingon" but since I downloaded it, it is now an app store product. I guess my next goal is to learn the launchd command. Like I said, I'm new to the UNIX environment so I need a lot of patience, which the app store does not seem to be providing because of the influx of interest in apps.

I'm still glad that I jumped off the sinking ship that is?

Onward and upward!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.