Unicode text and class URL
Unicode text and class URL
- Subject: Unicode text and class URL
- From: Bill Hoffman <email@hidden>
- Date: Sun, 21 Mar 2004 23:52:45 -0800
I set a variable to a URL string with:
set x to "
http://www.apple.com"
In the script editor x is created as an object of class string. I can
then successfully create an object of class URL from it with:
x as URL
If I grab a URL from Safari with:
"tell app 'safari' to set x to URL of document 1"
it returns a Unicode text string. Converting that to an object of class
URL with:
x as URL
fails with the error message "Can't make ..... into a URL". Even if I
coerce that Unicode text string to a plain text string, "x as URL" will
still fail with the same error.
Is this an issue with Safari? with AppleScript? Shouldn't I be able to
grab the URL string from Safari and coerce it to class URL?
Thanks in advance for any explanation, if there is one.
--
"This is Preservation Month. I appreciate preservation. It's what you
do when you run for president. You gotta preserve." (Nashua, N.H., Jan.
28, 2000)
_______________________________________________
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.