On Mar 31, 2011, at 12:54 PM, Luther Fuller wrote: More ...
The applications Smile, AppleScript Editor and Terminal all exhibit this behavior:
I open a window, then drag & drop a .webloc file named "How SSL Works.webloc" (for example) from my desktop onto the window. The result is the text (but it's not enclosed in quotes)
In order to get an alias to this file, I have to type (not drag & drop) ...
set fileAlias to alias "OS_X:Users:lutherfuller:Desktop:How SSL Works.webloc"
which is a valid alias in AppleScript.
Hi Luther,
As an experiment (running 10.6.6), I saved an app with the following code on open theFiles display dialog theFiles as text end open then dragged three files on it: a PDF, an Excel doc, and a webloc file.
The dialog box appeared, but only the PDF and Excel docs were shown in the dialog. The webloc file was not included in theFiles list. (And, coincidentally, the webloc file was NOT opened in Safari!) So even though this kept the webloc from opening, there's still no access to the file itself. Clearly, the 'on open' handler does not treat webloc files as regular files.
When I dragged three webloc files on the same script, one of them (but not all) opened in Safari. And, as you pointed out, the script essentially dies at that point. I can't figure out what dictates which webloc opens, but it's not the alphabetical order of either their filenames or URLs nor the chronological order of either their creation or modification dates.
It's all very strange!
Stan C.
|