Re: Applescript in the terminal (fwd)
Re: Applescript in the terminal (fwd)
- Subject: Re: Applescript in the terminal (fwd)
- From: Jim Skibbie <email@hidden>
- Date: Sat, 20 Apr 2013 16:46:58 +0000
- Thread-topic: Applescript in the terminal (fwd)
> I lied, I just thought of one more question. Can one compile an
> applescript from within terminal from a simple text file?
Yes. Check out the man page for osacompile (from Terminal, type: man osacompile).
A Terminal command like:
osacompile -o ~/Desktop/my_script.app ~/Desktop/source.txt
will produce an Applescript application on the path (your desktop) named "my_script.app" from a file on the path (your desktop) named "source.txt".
My "source.txt" file contained:
display dialog "Hello World"
There are flags to make the app execute only ( -x ), stay open ( -s ), etc. The name you pass for the –o flag determines the output format, so you can pass .applescript or .scpt or .app and get different
formats.
|
_______________________________________________
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