Server error 19?
Server error 19?
- Subject: Server error 19?
- From: Michael Grant <email@hidden>
- Date: Fri, 19 Jul 2002 01:21:03 -0500
I am trying to write a script that will duplicate the open URL functionality
of the old Apple Data Detectors using Big Cat to show the script in a
contextual menu. It works well in Word and in most of the other applications
I've tried where Big Cat works at all, except for Entourage. In fact,
essentially the same script *does* work from Entourage's script menu or from
the system script menu. I've tried various tricks to make sure that the
argument to "open location" is a well-formed URL, and as far as I can tell
it is, but the URL just won't open when I run the script in Entourage from
the Big Cat menu.
Here's the basic script:
on main(s)
set theString to s as string
-- some text parsing steps to clean the text from the selection,
identify the protocol, etc.
-- allow the user to correct the resulting URL manually
set the_URL to text returned of (display dialog "Open URL:" default
answer theString)
open location the_URL
end main
The funny thing is, if I change the script to this:
on main(s)
set theString to s as string
set the_URL to text returned of (display dialog "Open URL:" default
answer theString)
set the clipboard to the_URL
end main
I can then use a similar script which takes the text input from the
clipboard, and the URL opens right up. But modifying the original script to
try passing the data through the clipboard before opening the URL doesn't
work.
The one clue I've found to what's going wrong is when I put the open
location command in a Finder tell statement like this:
on main(s)
set theString to s as string
set the_URL to text returned of (display dialog "Open URL:" default
answer theString)
tell application "Finder" to open location the_URL
end main
If the selected text is "www.apple.com", this results in a Finder error
message stating "No file services are available at the URL
http://www.apple.com. Try again later or try a different URL (server
returned error 19)."
Does anyone know what server error 19 could be, or have some other
suggestions for making this thing work?
Thanks,
Michael
--
"Why didn't Tom Paine encourage people in Colonial times to search for a
more socially responsible king?"
- POCLAD
_______________________________________________
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.