Mac Running app from Terminal saved with Applescript Editor...

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...
 

jiminaus

macrumors 65816
Dec 16, 2010
1,448
0
Sydney
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
 

orbdrums

macrumors member
Original poster
Dec 13, 2008
78
0
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...
 

foidulus

macrumors 6502a
Jan 15, 2007
906
1
You also may want to look into osascript, it allows you to directly execute applescript from the terminal(or inside scripts).
 

orbdrums

macrumors member
Original poster
Dec 13, 2008
78
0
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!