Skip to content
Matthew Davis edited this page Apr 23, 2014 · 3 revisions

Scripting for MSD is accomplished with javascript. However, we provide the necessary tools to build your signatures with ease, two objects are provided with the script; Signature(sig) and Filter(filter).

There are three tasks to create a signature from start to finish. Initializing it, modifying it, and saving it.


Initialize

This the only true mandatory step to start and allow you to do anything. We must specify to the user for which Anime list we are looking to go by and the size of the signature. This will grab the most recently anime that has been update on your list.

sig.initSignature("Apocist", 600,110);

This example grabs the anime list for Apocist and creates a base image of 600 by 110 pixels for us to work with.



Skip parts for now(to do)



Saving the image

Right now there are two ways to save the signature we designed: Simply saving it as an image locally, OR upload to a personal web host via FTP.

MSD supports file types PNG, JPG, BMP, WBMP, and GIF.

sig.saveSignature("image.png");

This example saves the signature as a whole as "image.png" inside the directory of the program. It will automatically detrimine whether what file type to save it as based on your filename, however you may specify a certain file type with and additional String parameter:

sig.saveSignature("image", "png");

(Would save it as "image" with no file extension and a png file)

sig.uploadToFTP("hikaritemple.com", "/sig/image_apocist.img","ftp_username","ftp_password");

This example shows how one would save the signature else where such a website. In this example the first parameter is the server that it must connect to (hikaritemple.com), along with the path to save it in the next parameter (/sig/image_apocist.img). Of course, to access the FTP you would also need to provide your username and password. This example saves the image to http://hikaritemple.com/sig/image_apocist.img

Clone this wiki locally