Re: AppleScript TID bug OS 10.2.5? [again]
Re: AppleScript TID bug OS 10.2.5? [again]
- Subject: Re: AppleScript TID bug OS 10.2.5? [again]
- From: julifos <email@hidden>
- Date: Sat, 26 Apr 2003 20:55:30 +0200
This will also fail. He reported that the code worked ok from a script
editor window, but not when clicked from the Finder, and I think it is not
very relevant whether the open handler processes the
"path-to-whatever-file-in-your-disk" instead of "path-to-me" (which, in
fact, is "path-to-whatever-file-in-your-disk").
JJ
>
At 7:44 pm +0200 26/4/03, julifos wrote:
>
>
>
>
> I've confirmed again the error.
>
>
>
> I sent a little applet called "Bug Test" to this user to see what was going
>
> on. This is the code, courtesy of Mr. J. D. (I attached a simple dialog to
>
> the end, in order to see the results)
>
>
>
I can see no error except that you sent your man an APPLET instead of
>
a DROPLET. The script you sent contained an implicit run handler,
>
which you should have deleted. The droplet should have the script
>
below.
>
>
When a file is dropped on this it will give the container and the
>
filename. So far as I can tell, the script you sent him is behaving
>
just as it ought to. The problem is that you sent the wrong script.
>
>
JD
>
>
>
>
(* THIS BIT SHOULD NOT HAVE BEEN INCLUDED !!!
>
set ls to {path to me, path to "cusr", path to startup disk}
>
open ls
>
--
>
*)
>
on open ls
>
set {f, _colon} to {"" & item 1 of ls, false}
>
if f ends with ":" then set {f, _colon} to {text 1 through -2 of f, true}
>
set text item delimiters to ":"
>
if (count text items of f) is 1 then return {"", f & ":"}
>
set _container to "" & text items 1 thru -2 of f & ":"
>
set _file to last text item of f
>
if _colon then set _file to _file & ":"
>
set text item delimiters to ""
>
tell application "Finder"
>
activate
>
display dialog _container default answer _file
>
end tell
>
>
>
>
>
>
end open
_______________________________________________
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.