Re: Odd Behaviour
Re: Odd Behaviour
- Subject: Re: Odd Behaviour
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 29 Sep 2002 12:39:05 -0700
On 9/29/02 12:00 PM, "bill fancher" <email@hidden> wrote:
>
> So, as a last resort to test my lovely little script, I decided I
>
> would edit "Mimic PC Monitor" and just be done with it. From then on,
>
> it uses "Update Servers" no matter what Applescript I choose. Is MacOS
>
> X choosing the lowest dated AppleScript instead of the one I want?
>
>
Sound like it might be doing something like that. Need a bit more info
>
to confirm that.
>
>
> Can anyone shed some light on this before I give up on my
>
> Applescripted ML-Donkey front-end project as worthless?
>
>
There are some possible workarounds, depending on what the problem is.
>
If it's what you suspect, you could, e.g. try changing the creator type
>
of your app:
>
>
tell app "finder" to set creator type of ... to ___
>
>
Where "..." is a ref to your app and "___" is a some four character
>
creator type of your choosing.
As Bill says, the script just finds an application (file type "APPL") with
creator type "aplt". So you can either give it its own creator type (which I
think may also require you to add an icon resource or it will just have a
generic application icon) or do what I usually do. I set a script property
to the applet as an alias (so the user can move it or even rename it
afterwards and all is OK), but make it blank and ask the user to find it
first run only:
property myAppAlias : missing value
if myAppAlias is missing value then
set myAppAlias to (choose file of type {"APPL"} with prompt "Where is
Super-Duper App?")
end if
Actually, just in case somebody moves it to another computer, it's a good
idea to preface it like this:
property myAppAlias : missing value
if myAppAlias /= missing value then
try
get myAppAlias
on error
set myAppAlias to missing value
end try
end if
if myAppAlias = missing value then
set myAppAlias to (choose file of type {"APPL"} with prompt "Where is
Super-Duper App?")
end if
For ever after it will know where to find your app. If you need to call it
as an application at any point, do it like this:
set myAppPath to myAppAlias as string -- current path, wherever it may be
tell application myAppPath to run -- or whatever
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.