Re: [MacRuby-devel] Small WebView commandline script

2011-08-03 Thread Matt Aimonetti
ohh that's a neat trick, thanks Eloy! - Matt On Wed, Aug 3, 2011 at 1:39 AM, Eloy Durán wrote: > > 2) Is there anyway to embed/access a web developer console like the one > in Safari? > > You can enable it by doing the following at the start of the app: > > NSUserDefaults.registerDefaults(WebKi

Re: [MacRuby-devel] Small WebView commandline script

2011-08-03 Thread Eloy Durán
> 2) Is there anyway to embed/access a web developer console like the one in > Safari? You can enable it by doing the following at the start of the app: NSUserDefaults.registerDefaults(WebKitDeveloperExtras => true) ___ MacRuby-devel mailing list Mac

Re: [MacRuby-devel] Small WebView commandline script

2011-08-02 Thread Matt Aimonetti
1) NSApplication.sharedApplication.activationPolicy = NSApplicationActivationPolicyRegular NSApplication.sharedApplication.activateIgnoringOtherApps(true) That will give your CLI app focus. 2) No idea, the inspector is just html + js, so you should be able to port it. You can also use the webkit

[MacRuby-devel] Small WebView commandline script

2011-08-02 Thread Andrew O'Brien
I've been doing some HTML scraping with Mechanize recently and I figured I could use a small tool that opens up a small WebView and reads HTML fragments from STDIN. Here's what I came up with: https://gist.github.com/1121174 There are a couple of things wrong with it that I chalk up to noobish