• 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: garbanzito <email@hidden>
  • Date: Wed, 22 May 2002 16:12:33 -0600

at 2002 05 22, 00:04 -0700, they whom i call Chris Page wrote:
On Tuesday, May 21, 2002, at 10:51 PM, garbanzito wrote:

i haven't thought this through or attempted to implement it, but it would seem that if an "application bundle" could be wrapped around a script, and if in that bundle were a resource that was a small applet (for which "path to me" works as expected), then perhaps the main script could call the applet to reliably get the location. and application bundles work on Mac OS 9 too, so just maybe it would be a backwardly compatible, though kludgey, solution.

Maybe I missed something, but I thought "path to me" works fine for script applets? Although support for bundled applets sounds nice (and I thought that's what AppleScript Studio already produces), I think the problem of getting to resources in applets is a solved one.

i wasn't solving the problem for applets. i was talking
about an applet (A) that would accompany a non-applet script
(B), within B's bundle, and provide B with its path so that
other resources could be found. presumably if B can be
found, so can A ...

but after thinking about it, i think neither an auxiliary
applet nor a bundle is necessary. instead, just structure
the non-applet script with a handler like this:

property my_path : "i don't know"
on set_path (the_path)
set my_path to the_path
end set_path

and call set_path() at the point the script object is
loaded. presumably at that point the path *is* known ...

henceforth the script can be passed to another environment
and retain knowledge of it's path.

--
steve harley email@hidden
_______________________________________________
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: Chris Page <email@hidden>)

  • Prev by Date: Special folder names?
  • Next by Date: Re: iTunes Scripting: How do I get the name of the library?
  • Previous by thread: Re: osascript - path to me
  • Next by thread: Re: osascript - path to me
  • Index(es):
    • Date
    • Thread