What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Preventing scripts from installing or running

Preventing scripts from installing or running
Author: Message:
Weyzza
Veteran Member
*****

Avatar
SoCal sunset > *

Posts: 1170
Reputation: 29
– / Male / –
Joined: May 2003
O.P. Preventing scripts from installing or running
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]

This post was edited on 03-02-2007 at 07:02 AM by Weyzza.
Registered 7852 days, 21 hours, 40 minutes, 38 seconds ago.
Happy Birthday, WDZ

03-02-2007 06:46 AM
Profile PM Find Quote Report
Thor
Veteran Member
*****

Avatar
Awwwwwwww.

Posts: 1118
Reputation: 42
32 / – / Flag
Joined: May 2006
RE: Preventing scripts from installing or running
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)
:plus4: Translation guidelines for Messenger Plus! Live
I'm no longer around this town, but I miss the community dearly. You can always find me lurking in #banana, or at
nitrolinken.net.
03-02-2007 06:59 AM
Profile PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Preventing scripts from installing or running
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.
03-02-2007 07:25 AM
Profile E-Mail PM Web Find Quote Report
Weyzza
Veteran Member
*****

Avatar
SoCal sunset > *

Posts: 1170
Reputation: 29
– / Male / –
Joined: May 2003
O.P. RE: Preventing scripts from installing or running
quote:
Originally posted by Felu
...don't run the script...
How? :p
I cannot think of a clean way to do that.
Registered 7852 days, 21 hours, 40 minutes, 38 seconds ago.
Happy Birthday, WDZ

03-02-2007 07:32 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Preventing scripts from installing or running
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.
03-02-2007 07:47 AM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Preventing scripts from installing or running
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.
[Image: markee.png]
03-02-2007 09:07 AM
Profile PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Preventing scripts from installing or running
In Now Playing for the DownloadFile issue i just do

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


This post was edited on 03-02-2007 at 11:05 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
03-02-2007 10:59 AM
Profile PM Web Find Quote Report
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
37 / Male / Flag
Joined: Jul 2003
RE: Preventing scripts from installing or running
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?
03-02-2007 03:19 PM
Profile E-Mail PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Preventing scripts from installing or running
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
}

[Image: 1-0.png]
             
03-02-2007 03:38 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Preventing scripts from installing or running
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.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-03-2007 01:58 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On