Why applescript? Why not a scripting language that does all that applescript does and is also crossplatform? This is not meant to bash applescript, which is a fine scripting language. It's just that applescript won't run on Win32, *NIX, VAX... Other scripting languages will (python, perl and javascript even).
Why applescript? That's because mac applications can include "dictionaries" of commands that applescript can use. Try scripting photoshop and filemaker in python or some other language.
That's applescript's true power really. If it was just used as a standalone language without outside application support, it would be fairly weak.
> Why applescript? That's because mac applications can include "dictionaries" of commands that applescript can use.
Actually:
"The Open Scripting Architecture (OSA) is an API that provides a standard mechanism for creating scriptable applications and for writing scripting components to implement scripting languages. The AppleScript component implements AppleScript, the standard scripting language defined by Apple, but developers can also write scripting components for additional scripting languages."
One difference is that (I believe) OSA has been around longer than WHS, and less of an afterthought/add-on.
As far as I understand it OSA is like WHS + COM (or whatever it is these days). In fact you can even send AppleEvents over networks (if you enable it).
So, Python + win32 COM bindings is somewhat equivalent to Python + AppleEvent/OSA bindings.
I think OSA/AE is more integrated into the environment with most applications at least supporting the "Standard Suite" which includes opening & closing docu
So you're not restricted to using AppleScript to get those benefits.
And in fact, the OSA is more than a theoretical possibility. There's a free Javascript OSA module [latenightsw.com] available...use Script Editor to control your mac using Javascript!
Try scripting photoshop and filemaker in python or some other language.
Indeed. Why don't you try scripting Photoshop in Applescript? Photoshop doesn't support Applescript, except to open documents and let you fire off Photoshop actions. You can't get any data in or out through Applescript. You can't say (for example) if the image is wider than it is tall do this, otherwise do that.
Somewhat off topic but... (Score:3, Insightful)
that does all that applescript does and is
also crossplatform? This is not meant to bash
applescript, which is a fine scripting language.
It's just that applescript won't run on Win32,
*NIX, VAX
(python, perl and javascript even).
-d
Re:Somewhat off topic but... (Score:4, Informative)
That's applescript's true power really. If it was just used as a standalone language without outside application support, it would be fairly weak.
Re:Somewhat off topic but... (Score:5, Informative)
Actually:
"The Open Scripting Architecture (OSA) is an API that provides a standard mechanism for creating scriptable applications and for writing scripting components to implement scripting languages. The AppleScript component implements AppleScript, the standard scripting language defined by Apple, but developers can also write scripting components for additional scripting languages."
-- <http://developer.apple.com/documentation/Carbon/
So you're not restricted to using AppleScript to get those benefits.
Python, for example, is able to both send and receive Apple Events.
Re:Somewhat off topic but... (Score:2)
That reminds me WHS in Windoes. But the history shows that script programmers on Windows prefer Python and Tcl without WHS.
Re:Somewhat off topic but... (Score:2)
As far as I understand it OSA is like WHS + COM (or whatever it is these days). In fact you can even send AppleEvents over networks (if you enable it).
So, Python + win32 COM bindings is somewhat equivalent to Python + AppleEvent/OSA bindings.
I think OSA/AE is more integrated into the environment with most applications at least supporting the "Standard Suite" which includes opening & closing docu
Re:Somewhat off topic but... (Score:3, Insightful)
And in fact, the OSA is more than a theoretical possibility. There's a free Javascript OSA module [latenightsw.com] available...use Script Editor to control your mac using Javascript!
Re:Somewhat off topic but... (Score:1)
Re:Somewhat off topic but... (Score:2)
Just in case you're interested, a quick Google (for Python and Photoshop or Filemaker) brings up:
http://opensource.adobe.com/ (Stuff seems to be Windows only.)
Plus references to using Python + AppleEvents including:
http://www.letterror.com/code/fmpro/
http://ho
Re:Somewhat off topic but... (Score:1)
Indeed. Why don't you try scripting Photoshop in Applescript?
Photoshop doesn't support Applescript, except to open documents and let you fire off Photoshop actions. You can't get any data in or out through Applescript. You can't say (for example) if the image is wider than it is tall do this, otherwise do that.
Re:Somewhat off topic but... (Score:1)