{"id":60,"date":"2009-07-13T19:08:40","date_gmt":"2009-07-14T00:08:40","guid":{"rendered":"http:\/\/fw.hardijzer.nl\/?p=60"},"modified":"2009-07-13T19:08:40","modified_gmt":"2009-07-14T00:08:40","slug":"livescratcher-now-what","status":"publish","type":"post","link":"https:\/\/fw.hardijzer.nl\/?p=60","title":{"rendered":"LiveScratcher: Now what?"},"content":{"rendered":"<p>LiveScratcher, and it&#8217;s early abandoned brother project Modumes, have been in the pipeline for months now. I think I had the initial idea of a modular extension platform for Messenger well over a year ago. Either way, I never really had a lot of time to put some real work into it. Until now, that is. Holidays have started two weeks ago, and I&#8217;ve been crashing at my parent&#8217;s place (free food \ud83d\ude09 ) and working on LiveScratcher non-stop since. I hadn&#8217;t quite expected it (what would you expect from a project that&#8217;s been in the making for months without any results), but I feel that the end of the road (or at least something worth showing) is near \ud83d\ude42<\/p>\n<p>I&#8217;ve put up the initial scaffolding for the Messenger API, and am currently filling in the functionality for the Messenger, Contact, and Conversation classes. The DirectUI (messenger&#8217;s user-interface library) module is in a somewhat usable state, and I&#8217;ve even written an old-style UIFile parser to it (written completely in Javascript). One package I haven&#8217;t started on is the Interop (= communication with external libraries) one, but the plan for that one is well established in my head, and shouldn&#8217;t be too hard to implement.<\/p>\n<p>For now I&#8217;m aiming for something that is on-par with Messenger Plus!&#8217;s scripting, but once I reach that I hope to keep expanding and surpass it greatly. One of the advantages I have is the extensibility. Each package can export certain functionality, and as such anyone is free to extend the API as they wish. Someone could make a package solely dedicated to communicating with facebook or twitter, and other developers can then use those packages from their scripts, for example creating a script that keeps your facebook or twitter friends updated on how many contacts you have.<\/p>\n<p>Here&#8217;s a list of a few things that are done and worth mentioning:<\/p>\n<ul>\n<li>Minimal main system: the main system *only* contains the bare necessities needed to load the modules and scripts. As such you can replace virtually anything with your own implementation; Don&#8217;t like the standard Console? take it out and write your own.<\/li>\n<li>Google&#8217;s V8 JavaScript engine: The same engine that&#8217;s behind the blittering speed of Google Chrome. A downside is that things like &#8220;new ActiveXObject&#8221; aren&#8217;t supported, but upsides are plenty: It&#8217;s fast, it&#8217;s flexible, it&#8217;s standards compliant, and it actually allowed me to do the DirectUI stuff (Microsoft&#8217;s JScript was a bitch when it came to threading, V8 just sticks to one)<\/li>\n<li>Code searching package: No more hard-coding of patch offsets, simply define what kind of pattern you&#8217;re looking for, and this package will find the offset(s) for you. It&#8217;ll optimize multiple patterns so only one pass over the memory is needed, so it should be really fast, and it&#8217;ll run in the background and only keep your script waiting minimally: it will return the offset the millisecond it&#8217;s found, and continue searching in the background.<\/li>\n<li>Quick and simple console package that outputs script errors, and exports functions to add messages, warnings, or errors so you have an easy way to output data to the user.<\/li>\n<li>DirectUI access: Want to remove a button from messenger? add a new one? Move the wordwheel to the bottom of the contact list? It&#8217;s all possible.<\/li>\n<li>UIFile parser completely implemented in JavaScript, allows you to define your own output callbacks (or use existing ones), so someone could easily stick in a UIB compiler.<\/li>\n<li>Packages can consist of modules (DLLs) or scripts, or even a combination of both.<\/li>\n<li>The actual Messenger API is a mess, there&#8217;s about three different ways to do things, and half of the functionality is often broken. But as a package developer you don&#8217;t have to worry about that: I&#8217;ve taken the time to write a Messenger package that takes care of all that for you, and exports an easy to use interface for your scripts to use \ud83d\ude42<\/li>\n<li>Need some functionality that&#8217;s not yet in LiveScratcher but is in Plus? For now there&#8217;s a PlusCom package that allows you to make a (string values only) bridge between a Plus! script and a LiveScratcher package.<br \/>\nI&#8217;m not sure if this will be useful when it&#8217;s all done, but it was a nice experiment, and might come in handy with other things.<\/li>\n<li>Need to pop up a toast? That&#8217;s already in the Messenger module \ud83d\ude42 with callbacks and everything. And not fake lookalike toasts, nope, actual real Messenger toasts with custom text.<\/li>\n<\/ul>\n<p>Now, it all sounds really great when I put it like this, but there&#8217;s also a bunch of things that are missing (but that I do plan to implement some day):<\/p>\n<ul>\n<li>Debugger: as of now, all you have is some errors in the console if something goes wrong. I&#8217;m planning on exposing the V8 debugger protocol and write a nice debugger plugin for Eclipse or Notepad++ or something like that.<\/li>\n<li>More advanced Interop: For now I&#8217;m focussing on an interop approach like Plus!. A simpe way to call external libraries with integers or strings, and some memory block class for pointer stuff. When I have the time I&#8217;m hoping to come up with a nicer approach that allows you to specify a structure and it will make a memory-block automatically and catch all get\/set calls to it.<\/li>\n<li>Protocol level stuff: For now I&#8217;m focussing on exposing all the API based stuff, but at some point I hope to write a proxy\/protocol-analysing package that would allow for similar functionality to Messenger Discoveries&#8217;s plugins.<\/li>\n<li>RichEdit hooking: It&#8217;s going to be a big project, but I do hope to implement some kind of RichEdit hook and expose that, so scripts can implement new mark-up stuff. For example implement Plus!&#8217;s coloring, or implement a LateX package that automatically converts latex to images.<\/li>\n<\/ul>\n<p>Well, now you know most of what it is and my plans about it. If for some reason you got excited (sure hope you did \ud83d\ude09 ) and want to take a look and give some feedback, please don&#8217;t hesitate to contact me. Just leave a comment and I&#8217;ll get in touch with you. I&#8217;ll gladly send it over and give you all the help you need to get using it. At this point however I&#8217;m not quite comfortable with just uploading it here (as it&#8217;s still very very crude and rough around the edges), so you will have to personally ask me if you want to take a peek \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LiveScratcher, and it&#8217;s early abandoned brother project Modumes, have been in the pipeline for months now. I think I had the initial idea of a modular extension platform for Messenger well over a year ago. Either way, I never really had a lot of time to put some real work into it. Until now, that &hellip; <a href=\"https:\/\/fw.hardijzer.nl\/?p=60\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">LiveScratcher: Now what?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,35,9],"tags":[],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-javascript","category-livescratcher-messenger","category-messenger"],"_links":{"self":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60"}],"version-history":[{"count":1,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":61,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions\/61"}],"wp:attachment":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}