Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
First public test available!
07-17-2009, 06:54 PM (This post was last modified: 07-17-2009 07:02 PM by TheBlasphemer.)
Post: #1
First public test available!
So here it is. LiveScratcher. Nowhere near ready, but open for public testing nevertheless.

First off: If you're not a scripter/developer, and don't intend to be, go away now Tongue shoo! This is really not intended to be of any use to normal users. It's also not some kind of continuation of StuffPlug, so don't bother if you're looking for that.

Good, you're still reading. That means you must either be a developer, or a very stubborn user intending to be one some day. So let's get started. There is no installer yet (and it isn't too high on my priority list either, so don't wait up for one), so you'll have to do this all manually. And it's all modular, so it might take a little effort to get all packages in place, sorry about that Wink

First, let's install the base system:
  • Get base.zip.
  • Unzip it to "C:\Program Files\LiveScratcher\" or another directory of your liking (in all documentation I'll assume you have it installed in the default directory, you'll have to adjust the paths yourself)
  • Move the "msacm32.dll" file to your messenger directory (mostly "C:\Program Files\Windows Live\Messenger\". If you've previously installed StuffPlug3, it should already be there
  • Open regedit (start->run->regedit) and go to HKEY_LOCAL_MACHINE\Software\iAvatars.com\CooperativeLoader. if it doesn't exist, create it.
  • Create a new string value with the name "LiveScratcher" and the value "C:\Program Files\LiveScratcher\Preloader.LiveScratcher.dll".
  • Congratulations! LiveScratcher should now be set up!

Now, remember that part about LiveScratcher being modular? Yeah, turns out that LiveScratcher by itself isn't much use. At all. It does nothing. So how do I make it useful? Add packages! Smile
All base packages can be found here
So how do I install a package? Here's how:
  • Open the XML file (e.g. BasicClasses.xml). If only text shows up (for example, when using Google Chrome) right-click and hit view source.
  • Note the name (it's in Package\Information\Name, in this case "LiveScratcher.BasicClasses")
  • Take note of the \Package\Dependencies part. In this case it's empty, but any packages listed there should be installed before the package can work.
  • Create a directory in the packages directory by that name (in this case "C:\Program Files\LiveScratcher\Packages\LiveScratcher.BasicClasses\")
  • Download the zip file referenced in the XML at \Package\Information\PackageDataURL (in this case this file)
  • Extract the zip file to the directory you created earlier. package.xml should be in the root of that directory.
  • Hurrah! another victory! Now you installed a package!

For now, I suggest you just install all packages in the basepackages directory and go from there.

So now we have a bunch of packages installed, and it still doesn't do anything. Annoying, isn't it ?
So here's where we start scripting Smile
  • Create a new directory in the packages directory, and name it "TestPackage".
  • In the directory, create a new XML file named "package.xml" with the following contents:
    XML Code
    <?xml version="1.0" encoding="utf-8"?>
    <Package>
      <Information>
        <Name>TestPackage</Name>
        <Author>Test author</Author>
        <Version>1.0</Version>
        <Description>A small test package.</Description>
      </Information>
      <Contents>
    	<Script>Main.js</Script>
      </Contents>
      <Dependencies>
    	<Dependency>LiveScratcher.Console</Dependency>
      </Dependencies>
    </Package>

  • Create a JS file named "Main.js" with the following contents:
    JAVASCRIPT Code
    function getGlobal(){
    	return (function(){
    		return this;
    	}).call(null);
    }
     
    function registerDependencies(packageapi) {
    	var g=getGlobal();
    	var dependencies=packageapi.getDependencies();
    	for (var i in dependencies) {
    		var name=dependencies[i];
    		var shortname=name.split(".").pop();
    		g[shortname]=packageapi.getExport(name);
    	}
    }
     
    function onInitialize(packageapi) {
    	registerDependencies(packageapi);
    	Console.show();
    	Console.print("Hello world!");
    }

  • Re-start messenger
  • You should now be greeted with a text window saying "Hello world!" Smile

Well, that's the basics. One last trick, if you hold the left alt, shift, and control keys while messenger is starting, LiveScratcher will not be loaded (it'll beep quickly once it's skipped). That should come in handy when testing, for example you could run one messenger instance without LiveScratcher to chat, and have another one that you're constantly restarting to test stuff Tongue

On a final note: If you're ever uncertain about something, want to know something about a package, or want to know about what's coming up, please do not hesitate to ask on these forums.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
First public test available! - TheBlasphemer - 07-17-2009 06:54 PM

Forum Jump: