To load PlayIt in an obey file using only the global resource and generating an error if it cannot be loaded:
[ Parent ]
[ Manual root ]
if "<PlayIt$Path>" = "" then Error PlayIt resource could not be found
Unset PlayIt$Error
/PlayIt:Ensure -e 1.58
if "<PlayIt$Error>" <> "" then Error <PlayIt$Error>
Omitting the first line allows the script to complete without error if the PlayIt resource is not available in which case the application should internally test whether PlayIt is running. An error will still be reported if PlayIt can be found but it's an unsuitable version. Omitting the last line will suppress this error too which again should be tested by the application instead.
If you want to revert to a local copy of PlayIt within application resources:
Unset PlayIt$Error
if "<PlayIt$Path>" <> "" then /PlayIt:Ensure -e 1.58
if "<PlayIt$Error>" <> "" then Error <PlayIt$Error>
if "<PlayIt$Path>" = "" then RMEnsure PlayIt 0.00 ...
WimpTask RMRun <AppRes$Dir>.PlayIt.PlayIt <AppRes$Dir>.PlayIt.
It is important not to use RMEnsure PlayIt with a non-zero version number because this can load a new version when PlayIt is being used by another application.
Created by SHtoHTML v1.20