• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: osascript - path to me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: osascript - path to me


  • Subject: Re: osascript - path to me
  • From: Timothy Bates <email@hidden>
  • Date: Mon, 20 May 2002 10:27:13 +1000
  • .mxoez?+: O?W^h1]g}IB\WO2A=6#`2^rL?jAu,r8EcKz@UG.r.7[$&Ym;j8^Wp;/KAlcda MO/$} $"[ c?\#d@cuN
  • 9+kli1>@: KaeEcbn$EIG)tY@^[7y`lyrI<4S(cnqzmTD&4<tTkuNR(4dweN}SUlDX/X^c>"

Hi arthur,

I thought of a similar solution (not overloading the path to me, but
intercepting the call inside a larger handler which defines the location of
resource and results folders for my application). I have tried detecting the
failed path to me and asking the user to locate the file, and I have tried
placing hard coding in. Both of these cause endless support calls when
something works wrong, or, worse, keeps on working, but giving a false path
(as happens with hard coded paths).

> here is a very simple, (though hard-coded), system
> for making the "path to" command return the script's path during editing:
>
> -- For Apple's Script Editor:
> --
> on path to keywordConstant
>
> if (keywordConstant = me) then
>
> set aliasPath to continue path to me
>
> set strPath to aliasPath as string
>
> if strPath's text from word -2 to word -1 = "Script Editor" then
>
> return alias "MacHD:myScripts:thisScript"
> else
> return aliasPath --> applet's path
> end if
>
> else
> continue path to keywordConstant -- apple menu, startup disk,
> etc
> end if
> end path to
>
> path to me
>
>
>
> { Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
> <mailto:email@hidden>
> try
> <http://www3.sympatico.ca/victor.yee/>
> on error number -128
> end try
> }
> _______________________________________________
> 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.
_______________________________________________
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.

References: 
 >Re: osascript - path to me (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: MacRoman to ISO Latin 1 [was: Re: URL encode trouble]
  • Next by Date: Re: osascript - path to me
  • Previous by thread: Re: osascript - path to me
  • Next by thread: Re: osascript - path to me
  • Index(es):
    • Date
    • Thread