Re: Server error 19?
Re: Server error 19?
- Subject: Re: Server error 19?
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 19 Jul 2002 00:03:36 -0700
You may have a namespace conflict as if you were in an Entourage tell block.
'location' is a property of [calendar] 'event' in Entourage. Application
keywords take precedence in tell blocks. Try
(open location) the_URL
I have no idea what this "Big Cat' thing is. But it may be the type of
context that makes everything run in a 'tell current application' context.
If so, then it's as if you're running your script in an Entourage tell
block. If the parentheses don't work on their own, try this. (It may do no
good to 'tell me to' because 'me' again could be the 'current application'.
so try both:
tell me to (open location) the_URL
and
tell AppleScript to (open location) the_URL
--
Paul Berkowitz
>
From: Michael Grant <email@hidden>
>
Date: Fri, 19 Jul 2002 01:21:03 -0500
>
To: email@hidden
>
Subject: Server error 19?
>
>
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.
_______________________________________________
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.