Command-line way to convert plain AppleScript file to Automator application?

To convert plain AppleScript file to a droplet, I can use

osacompile -o foo.app foo.applescript

My question: is it possible to use osacompile (or maybe there is another way, using command line) to convert plain AppleScript file (such as shown below) to Automator application instead?

on run {input, parameters}
	
	(* Your script goes here *)
	
	return input
end run

c28f4e7e8afa52043153396f5bdab8b5f9c30a1a

I‘m by far no expert in scripting - but no.

It’s because an AppleScript Applet/droplet is just a compiled script in a bundle.

An Automator-Application is by far more complicated because the AppleScript needs to be XML-Escaped and placed in a xml construct because Automator-Actions are based on XML.

What’s following afterwards is not clear to me but there’s some complex compiling involved before all gets bundled into an Application.

Maybe it’s part of Xcode‘s toolset that is involved… I don’t know…

Greetings from Germany :de:

Tobias

1 Like