The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Leopard-baked applescripts on Tiger machines (http://forums.omnigroup.com/showthread.php?t=6383)

RobTrew 2007-12-19 12:12 PM

Leopard-baked applescripts on Tiger machines
 
It seems that there is [URL="http://forums.omnigroup.com/showpost.php?p=29228&postcount=10"]at least one[/URL] 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

[QUOTE=MB_UST;29584]Do you know if going the opposite direction is also a problem?[/QUOTE]

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 [URL="http://forums.omnigroup.com/showthread.php?t=6159&highlight=selected+trees"]a previous thread[/URL] ended on an optimistic note.

A script which worked on Leopard with:

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

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

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

RobTrew 2007-12-22 10:12 AM

[QUOTE=MB_UST;29584]Do you know if going the opposite direction is also a problem?[/QUOTE]

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 [URL="http://forums.omnigroup.com/showthread.php?t=6159&highlight=selected+trees"]a previous thread[/URL] ended on an optimistic note.

A script which worked on Leopard with:

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

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

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


All times are GMT -8. The time now is 03:45 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.