What's an OSAX, and would it be useful to build or more with functions from this forum?

If I understand the terminology correctly, an OSAX is a library of sorts that you can use to bundle a bunch of useful AppleScript routines, and I thought I read somewhere that it supports JXA also?

So I got to wondering if it would be useful for us to build one or more of these libraries that includes routines from this forum? I have no idea how you distribute OSAX files, how you update them, etc.

So, thoughts, anyone?

Hey Dan,

AppleScript Libraries are simple.

OSAXen are NOT simple.

-Chris

1 Like

That just makes it sound more interesting. :slight_smile: But I also trust your experience.

Thanks!

OSAX libraries (scripting additions) were provided long before Apple introduced Script Libraries.

Since we now have Script Libraries, I see no need or benefit to creating/maintaining an OSAX.

  • Script libraries are easier to create, maintain
  • They are just as easy to distribute
  • They are just as easy to use

####Using Script Libraries in AppleScript

use AppleScript version "2.4"
use scripting additions

--- SCRIPT LIBRARIES ---
use JMLib : script "[LIB] JMichael Lib AS"
use SQLLib : script "SQLite Lib AS"
use BPLib : script "BridgePlus"

####Using Script Libraries in JXA

'use strict';

var app = Application.currentApplication()
app.includeStandardAdditions = true

//--- SCRIPT LIBRARIES ---
JMLib = Library('[LIB] JMichael Lib JXA')

2 Likes

Hey Dan,

Tip of the iceberg.  :sunglasses:

If you really want to know more I can put you in contact with a couple of guys who are still writing osaxen.

-Chris

1 Like