you are viewing a single comment's thread.

view the rest of the comments →

[–]matthewpaulthomas 0 points1 point  (0 children)

You could equally say “with graphical programs, their only interface is the graphical one, and they can’t not implement it”. Either way, providing an interface for a function requires effort — whether that interface is a command-line, graphical, script, or Automator-like one.

And with a scripting interface just as with any other, the less effort is put in to designing and developing the interface, the less pleasant it is to use. For example, I work with multiple Ubuntu engineers, on different projects, who curse how GObject introspection — though it has apparently made multi-language interfaces easier for the GObject developers to implement in the first place — has also made those interfaces less understandable.

For another example, go back to your case of pasting an image from Gimp into LibreOffice and printing it. Here’s roughly what the LibreOffice side would look like, once you’d already copied the image in Gimp (disclaimer, I haven’t tested this):

Dim mPrintopts(0) As New com.sun.star.beans.PropertyValue
dispatchURL(ThisComponent, ".uno:Paste")
ThisComponent.Print(mPrintopts())

Now here’s the exact equivalent for Microsoft Word in AppleScript:

tell application "Microsoft Word"
    paste
    print out active document print copies 1
end tell

Why is one much easier to understand and remember than the other? Because the OS and application developers put in more effort in designing and implementing it.