Running Applescript through terminal commands...

Hey all :smiley:
Can someone please tell me how i can run applescipts through terminal?
I need it for SSH.
Im sure it’s possible i have seen it before. it was something like this


user/bin/osax/scrpt="display dialog \"as through unix!\" buttons {\"Ok\"}"

EDIT: [Moved ;)]

/usr/bin/osascript -e 'tell application "system events" to display dialog "as through unix!" buttons {"Ok"}'

You should really read the Man page for osascript

Moved to OS X and deleted double post…