PDA

View Full Version : Leopard-baked applescripts on Tiger machines


RobTrew
2007-12-19, 12:12 PM
It seems that there is at least one (http://forums.omnigroup.com/showpost.php?p=29228&postcount=10) potential problem with running Leopard-compiled applescripts on Tiger-powered machines.

As far as I can tell a workable solution may be to distribute such scripts in plain text .applescript form rather than as compiled .scpt files.

Tiger users should then be able to compile the scripts successfully in Script Editor, and save them as .scpt

MB_UST
2007-12-22, 06:21 AM
People have complained that my scripts, written and functional in Tiger, don't work in Leopard. Do you know if going the opposite direction is also a problem?

RobTrew
2007-12-22, 10:11 AM
Do you know if going the opposite direction is also a problem?

There is certainly at least one problem if you distribute Leopard-compiled (.scpt) scripts rather than text (.applescript) scripts - Tiger tends to choke on some special characters like ≠ and ¬ if the script was compiled on Leopard.

In addition there may be some residual fragility and non-portability surrounding scripts which refer to selected trees of content, even though a previous thread (http://forums.omnigroup.com/showthread.php?t=6159&highlight=selected+trees) ended on an optimistic note.

A script which worked on Leopard with:

tell application "Omnifocus"
tell front window
set lstTrees to selected trees of content
if (count of lstTrees) = 0 then

had to be rewritten (for at least one Tiger system) to the more explicit:

tell application "Omnifocus"
tell document window 1 of front document
set lstTrees to selected trees of content
if (count of lstTrees) = 0 then

RobTrew
2007-12-22, 10:12 AM
Do you know if going the opposite direction is also a problem?

There is certainly at least one problem if you distribute Leopard-compiled (.scpt) scripts rather than text (.applescript) scripts - Tiger tends to choke on some special characters like ≠ and ¬ if the scripts was compiled on Leopard.

In addition there may be some residual fragility and non-portability surrounding scripts which refer to selected trees of content, even though the a previous thread (http://forums.omnigroup.com/showthread.php?t=6159&highlight=selected+trees) ended on an optimistic note.

A script which worked on Leopard with:

tell application "Omnifocus"
tell front window
set lstTrees to selected trees of content
if (count of lstTrees) = 0 then

had to be rewritten (for at least one Tiger system) to:

tell application "Omnifocus"
tell document window 1 of front document
set lstTrees to selected trees of content
if (count of lstTrees) = 0 then