Grabbing the current URL of a webview
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