Skip to content
Tags

Start++ upcoming feature – Scripting!

by Brandon on May 19th, 2007

So it’s been a while since I’ve made a Start++ update.  But don’t worry, I haven’t forgotten about it!

This weekend I’ll be posting version 0.5.  What’s new?  Well, I fixed some common bugs (certain characters like double-quotes could get mangled in commands, etc), and have made improvements to the UI hook for those who run Start++ in the background.

There’s also a new feature:  script supported for Search Startlets.  What does that mean?  Well, previously when creating a Search Startlet you could only choose from two specific “actions” – Open Results and Play Media.  Now in 0.5, there’s a third option.  JavaScript.

How is this useful?  Well, here’s how you could write your own version of the Play Media action.

//System.ItemUrl
var fs = new ActiveXObject(“Scripting.FileSystemObject”);
var pList = fs.CreateTextFile(StartPath + “\\playlist1.m3u”, true);
pList.WriteLine(
“#EXTM3U”);
for(i = 0; i < ResultCount; i++)
{
   
var file = SYSTEM_ITEMURL[i];
    pList
.WriteLine(file.slice(5));
}
pList.Close();
var WshShell = new ActiveXObject(“WScript.Shell”);
WshShell.Run(“wmplayer.exe \”” + StartPath + \\playlist1.m3u\”);

Neat huh?

Just as before, you can export your Startlet to a file that you can share with others or submit to the gallery on BrandonTools.com.  The Startlet file will include your script, basically turning them into light-weight “plug-ins.”

From → Uncategorized

Comments are closed.