Shoutbox

Preventing scripts from installing or running - 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: Preventing scripts from installing or running (/showthread.php?tid=72243)

Preventing scripts from installing or running by Weyzza on 03-02-2007 at 06:46 AM

Is it possible to prevent scripts from installing or running when the required version of WLM or Plus! is not satisfied?

For example, we now have MsgPlus::DownloadFile added for Plus! 4.20, but that function is not available in previous versions of Plus!. So, if a user tries to import a script that had DownloadFile routine in it and he has an older version of Plus!, Plus! should prevent the script from installing or running. Then, the user will be notified to install the latest version of Plus!.
This is not limited to new functions, but it can be related to functions which have improved behaviors.

And because this should be done before the script running, Plus! should check it when the script is being imported. So, the script writer would have to include some optional information about the required versions in ScriptInfo.

Edit: stupid missing words [Image: deadzippy.gif]


RE: Preventing scripts from installing or running by Thor on 03-02-2007 at 06:59 AM

I think that is a great idea, it would help the problems with scripts that aren't updated yet for newer and older versions. (Y)


RE: Preventing scripts from installing or running by Felu on 03-02-2007 at 07:25 AM

Nice idea and you can do this in a script itself [Image: msn_tongue.gif]. You can check Plus!'s version through a script using MsgPlus.Version. If its less than 4.20, don't run the script and tell about the latest version of Plus! available.


RE: Preventing scripts from installing or running by Weyzza on 03-02-2007 at 07:32 AM

quote:
Originally posted by Felu
...don't run the script...
How? :p
I cannot think of a clean way to do that.

RE: Preventing scripts from installing or running by Felu on 03-02-2007 at 07:47 AM

quote:
Originally posted by Weyzza
quote:
Originally posted by Felu
...don't run the script...
How? :p
I cannot think of a clean way to do that.
don't run the features :P? Like if the version is below 4.20 write a value like enable or disable in the registry. Do a check within each function or something like that :P.

If its only for the updater, then you can Download the file is the version is above 4.20 else tell the user to download the update and the latest version of Plus! aswell.
RE: Preventing scripts from installing or running by markee on 03-02-2007 at 09:07 AM

I have done something similar to this in Message Customizer! Live, but because of time issues, I just have it open the download page for MP!L to try and give the person the idea of what is needed.  Maybe in a future version i will do something a little better.


RE: Preventing scripts from installing or running by -dt- on 03-02-2007 at 10:59 AM

In Now Playing for the DownloadFile issue i just do

code:
if(MsgPlus.Version >= 4.20){
//use new MsgPlus.DownloadFile
}else{
//use URLDownloadToFileW api
}


RE: Preventing scripts from installing or running by bigbob85 on 03-02-2007 at 03:19 PM

Why not
if (MsgPlus.Version < 4.20){
  //Get Taken to download site for update
  // Kill script somehow
MsgPlus.Messenger.Msgplus.Contact.Email.Mother = "This should do it";
}

Might be ugly, but it should work.. Right?


RE: Preventing scripts from installing or running by Ezra on 03-02-2007 at 03:38 PM

quote:
Originally posted by -dt-
In Now Playing for the DownloadFile issue i just do

code:
if(MsgPlus.Version >= 4.20){
//use new MsgPlus.DownloadFile
}else{
//use URLDownloadToFileW api
}




Isn't it possible to just use this:

code:
if(MsgPlus.DownloadFile){
//use new MsgPlus.DownloadFile
}else{
//use URLDownloadToFileW api
}


RE: RE: Preventing scripts from installing or running by CookieRevised on 03-03-2007 at 01:58 AM

quote:
Originally posted by Ezra
Isn't it possible to just use this:
code:
if(MsgPlus.DownloadFile){
//use new MsgPlus.DownloadFile
}else{
//use URLDownloadToFileW api
}

nope....

If the Plus! function DownloadFile exists (thus from build 4.20.262 onwards), this will generate an error. Plus! objects aren't the normal JScript objects, they work differently.