AppleScript to export script editor script as application
You must specify the full path where you want to save this application.

Here is an example that saves it in the "Applications" folder of the user.

set appName to "someAppName"
set thePath to (path to applications folder from user domain as string with folder creation) &amp; appName &amp; ".app"
tell application "Script Editor"
    set command to "do shell script " &amp; "\"/bin/ls\""
    set innard to {contents:command}
    set Tallgeese to make new document with properties innard
    compile Tallgeese
    save Tallgeese as "application" in thePath
    close document 1 -- close the document
    -- quit ---- quit the editor
end tell