Search code examples
macosapplescriptosx-server

AppleScript - is enterprise-ready?


Cause of the huge iPhone/iPad penetration our partners we have a new requirement.

We can solve those issues with AppleScript (ie. sending iMessages) but is this scripting system enterprise ready? I mean,

  • a dummy question first: is it silent? or it will show 1000 windows to send 1000 email?
  • is it stable and durable? (ie. is sending 2000 screenshots és 1500 imessages okay?)
  • is it "mature"? I mean if I'm using PowerShell then I feel myself in secure. Not too much superise, not too flat learning curve.

Share your experiences and insights please.


Solution

    • Is it Silent, depends on the app and your scripts, a lot of app will want to open a window on the screen etc, the level and type of support apps can have for AppleScripts can vary greatly.
    • Is it stable and durable, sort of, the issue is AppleScripts is not very fast, it does everything with AppleEvents, and so you can get timeout issues with AppleEvents a lot, or AppleScripts that take a long time, though I have to admit I haven't used AppleScript much recently but when I have with the modern faster CPUs, this is not as big an issue as it was in the past.
    • Is it mature, its been around longer than Mac OS X, the biggest issue with AppleScripts I have found is the language looks like natural language which gives you the impression that you can just write something that match its natural language pattern and it will work, but this is not the case, and because of its natural language like syntax it takes a while to know what will work, it mot like other languages where you can work out the syntax and then pretty much any combination that obeys that syntax will work. I still get frustrated with operation that work on list, the language give you the impression you can do some filtering ops on any list when in fact its up to the app you are AppleScripting to supply that functionality for you, for example you can ask finder to get every running app that has some property from every active application, but if you have your own list you have to enumerate over it manual and inspect each item individually.

    AppleScript is a language you can experiment with easily so I would just try some stuff out to see if it works the way you want, and then flesh out if its successful. People have used AppleScripts to write full Cocoa application, but I have never thought it was suitable for something like that.