• 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
Grabbing the current URL of a webview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grabbing the current URL of a webview


  • Subject: Grabbing the current URL of a webview
  • From: Evan Schoffstall <email@hidden>
  • Date: Fri, 01 Jul 2011 15:46:54 -0400

I've done some googling and found that the Objective-C way to do this is
NSString *url = "" dataSource] request] URL] absoluteString];

Using what probably shouldn't be called skills I converted the above to :

tell class "NSURL" to set mycurrentURL to mywebView's mainFrame's dataSource's request's URL's absoluteString()


However, If I want to use "mycurrentURL" it tells me that the variable is undefined. The next step is to catch a log using:


tell class "NSURL" to set mycurrentURL to log mywebView's mainFrame's dataSource's request's URL's absoluteString()


The above returns "NSObject". I seriously need some hep from you experts.
-- 
Evan Schoffstall
Sent with Sparrow
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Grabbing the current URL of a webview
      • From: Shane Stanley <email@hidden>
  • Next by Date: Re: Grabbing the current URL of a webview
  • Next by thread: Re: Grabbing the current URL of a webview
  • Index(es):
    • Date
    • Thread