Archive for the ‘C++’ Category

VandalSniper Beta around the corner

Tuesday, June 20th, 2006

I’ve been amazed at how easy Gtk# has made this project. If I were using MWF I’d be spending all my time trying to get the UI to behave properly when the form is resized. Simply put, Gtk#, or rather GTK+, takes care of resizing interface elements for me, and that’s one less thing — and a very complicated thing — that I have to code.

Granted, Gecko# can be a pain to work with, simply because it does not offer much in the way of interaction with a loaded page. However, in a previous post I explained how I patched jscall to allow the execution of arbitrary JavaScript on a loaded page. In combination with jscall’s existing data-passing framework, this has made my task of automating Gecko# almost painless.

The beta is almost here.

It’s alive!

Tuesday, June 13th, 2006

After many painful hours of Googling, more Googling, crying, pounding on the desk, and losing my temper in #mono, I have successfully added an ExecuteScript method to jscall, and the corresponding managed binding! With one method call in managed world it is now possible to execute an arbitrary script, passed as a string, inside of a Gecko# WebControl.

Combined with the already-existing jscall features, this means that the glue library can be injected into any page loaded in a WebControl, regardless of how that page was loaded!

I plan to reward myself by doing something that is unrelated to XPCOM in every possible way.

Gecko# interaction

Monday, June 12th, 2006

While developing VandalProof, it has become very obvious that being able to interact with the DOM of the displayed page will be vital to achieving the program’s goals. At this point, Gecko# does not offer any mechanism by which I can do this.

I talked with mikalh in #mono for a while, and he referred me to jscall, which I had been investigating earlier. Unfortunately this does not suit my needs, because it requires that a short JavaScript glue library be present on the page to work. But with further digging, it may be possible to execute arbitrary JavaScript on any page in Gecko# by making calls to C++ world, which would in turn use nsIScriptLoader to run the script.

More when/if I get it working.