Run AS iside Terminal

Hello!

I find a lots of posts, how to run Terminal command inside AS and get its result but i don’t find any topic, how to run AS inside Terminal and get the resut.

E.g:
A script on the desktop (test.scpt):

on run
set a to 100 – or “100”
return a
end run

Saved as Compiled Script or whatever needed. And (maybe) the Terminal command:

echo /Desktop/test.scpt

Is this possible or not? If it’s asked by somebody in the forum, sorry, I did’t find it.

Thank You!

Model: A little iBook. :slight_smile:
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi,

to run a compiled AppleScript within the terminal:

osascript ~/Desktop/test.scpt

to run a command line within AppleScript

do shell script "ls /"

:DD Thank you!

If you want to run AppleScript commands and scripts interactively in the shell, you should look into ASH by Cameron Hayne in ScriptBuilders.net

Alternate link for ash: http://hayne.net/MacDev/Ash/