Shoutbox

first time install script - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: first time install script (/showthread.php?tid=71126)

first time install script by cameron.stokes3 on 01-28-2007 at 03:39 PM

hi... i was wondering how to make it so that the first time you install the script it pops up a little window saying thanks for installing this script... etc... with a close button... it kind of does this on the itunes+ script where it asks if you want to view the help file... but i just want it to open a window with a little info on it and thats it...


RE: first time install script by Felu on 01-28-2007 at 03:44 PM

quote:
Originally posted by cameron.stokes3
hi... i was wondering how to make it so that the first time you install the script it pops up a little window saying thanks for installing this script... etc... with a close button... it kind of does this on the itunes+ script where it asks if you want to view the help file... but i just want it to open a window with a little info on it and thats it...
Use the registry. If a value(say first run) doesn't exist or is true, then display the window and write false to the value. If you need an example, just ask [Image: msn_wink.gif].
RE: first time install script by cameron.stokes3 on 01-28-2007 at 03:46 PM

yeah i do need an example please... im a bit new to this


RE: first time install script by Felu on 01-28-2007 at 04:05 PM

code:
var Shell = new ActiveXObject("WScript.Shell");

function OnEvent_Initialize(MessengerStart){
    try{
        if(Shell.RegRead(MsgPlus.ScriptRegPath+Messenger.MyEmail+"\\FirstRun") != "false"){//If FirstRun is not false
            Debug.Trace("This is the first run");
            //Display Welcome Window
            Shell.RegWrite(MsgPlus.ScriptRegPath+Messenger.MyEmail+"\\FirstRun", "false")//Set FirstRun to false
        }
    }catch(e){//If key doesn't exist
        //Display Welcome Window
        Debug.Trace("This is the first run");
        Shell.RegWrite(MsgPlus.ScriptRegPath+Messenger.MyEmail+"\\FirstRun", "false")//Set FirstRun to false
    }
}