• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unicode text and class URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Unicode text and class URL
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: Fink and 'sh'
  • Next by Date: Re: Title in display dialog
  • Previous by thread: Re: Title in display dialog
  • Next by thread: Re: Unicode text and class URL
  • Index(es):
    • Date
    • Thread