• 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
webview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

webview


  • Subject: webview
  • From: wayne melrose <email@hidden>
  • Date: Sun, 11 Sep 2011 12:13:52 +0200

Hi all,

I've got an application that I'd like to load html that I'd like to generate with applescript.

I've found a reference to "loadHTMLString" that will load a string from within the app (I think? ), although I'm falling short on implementing it.

I currently have this working.




on loadWebView_(sender)

    set urlString to "http://www.google.com";

	tell class "NSURL" of current application
		set myurl to URLWithString_(urlString)
	end tell

	tell class "NSURLRequest" of current application
		set myurlobj to requestWithURL_(myurl)
	end tell
    mywebView's mainFrame's loadRequest_(myurlobj)

end loadWebView_



however, what I'd like to have is something like this


on loadWebView_(sender)
	set strGenereatedHTML to "<html><body>woohoo!</body></html>"
	mywebView's mainFrame's loadHTMLString_(strGenereatedHTML)
end loadWebView_




Any help would be appreciated.. Thanks

Wayne
 _______________________________________________
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: webview
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: Re Connection is invalid problem
  • Next by Date: Re: webview
  • Previous by thread: Re: Re Connection is invalid problem
  • Next by thread: Re: webview
  • Index(es):
    • Date
    • Thread