Shoutbox

Scripts not independant of accounts... - 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: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: Scripts not independant of accounts... (/showthread.php?tid=78392)

Scripts not independant of accounts... by Malekith on 10-23-2007 at 03:28 AM

I found that if i open multiple instances of MSN, that i have the same scripts on every account i sign into. And if i disable a script on one account, it disables on both.  I want my scripts independent for each account, can i do this?


System details:
Windows Live Messenger Version 8.5
Messenger Plus! Version 4.23.0.276
Windows XP SP2


(sorry if this isn't considered a bug)


RE: Scripts not independant of accounts... by MattyRid on 10-23-2007 at 03:30 AM

it is normal behaviour for this to happen

but it could change in 4.50 but I'm not 100% sure


RE: Scripts not independant of accounts... by vikke on 10-23-2007 at 05:42 AM

This would be hard to implement, because all scripts gets enabled before you sign in, therefor it is impossible. If your script is well-coded, it will save all settings for each user.


RE: Scripts not independant of accounts... by Malekith on 10-23-2007 at 07:07 AM

It would not be hard to implement, thats ridiculous. You would just need separate script folder and settings for each user. -_-


RE: Scripts not independant of accounts... by -dt- on 10-23-2007 at 07:54 AM

quote:
Originally posted by vikke
This would be hard to implement, because all scripts gets enabled before you sign in, therefor it is impossible. If your script is well-coded, it will save all settings for each user.
Hm not really, it wouldnt be too hard.
Patchou could introduce an option in the scriptInfo.xml called <userLevel> and allow that to be set to global or user. If its global then store it how it currently is but if its set to user then install it into a directory like /scripts/email/scriptname and run it when the user signs in and unload it when that user signs out

and maybe Plus! could even have the option for both levels, and let the user choose when you install the script

RE: Scripts not independant of accounts... by Malekith on 10-23-2007 at 08:18 AM

I'd love to have this in the next version of Plus!. Because when debugging/testing my scripts i want it only running on one of my MSN's, otherwise there conflicting and its annoying. Took me 30mins to realize why my script wasn't working :P


RE: Scripts not independant of accounts... by Spunky on 10-23-2007 at 01:41 PM

I noticed this but it's not a major problem. Maybe each script should just find a list of users and save who it should be enabled for...


RE: RE: Scripts not independant of accounts... by vikke on 10-23-2007 at 02:55 PM

quote:
Originally posted by -dt-
quote:
Originally posted by vikke
This would be hard to implement, because all scripts gets enabled before you sign in, therefor it is impossible. If your script is well-coded, it will save all settings for each user.
Hm not really, it wouldnt be too hard.
Patchou could introduce an option in the scriptInfo.xml called <userLevel> and allow that to be set to global or user. If its global then store it how it currently is but if its set to user then install it into a directory like /scripts/email/scriptname and run it when the user signs in and unload it when that user signs out

and maybe Plus! could even have the option for both levels, and let the user choose when you install the script

This should work, but it would ruin the simplicity about scripts.

Also, you cannot run 2 scripts at the same time with different settings (if it's not programmed that way, some are).

Edit: It's not ridiculous, you don't seem to know anything about how scripts work. Some scripts may need to run when Messenger starts to apply their features. The best solution I've come up with is to create a new object for Messenger Plus!, called Registry or something.

Something like this:
code:
class Registry:
  function SaveGlobalSetting(Name, Value);
  function LoadGlobal(Name, Default);
  function SaveUserSetting(Name, Value);
  function LoadUserSetting(Name, Default);


RE: Scripts not independant of accounts... by markee on 10-23-2007 at 03:25 PM

What about in the registry, istead of using "Enabled" how about the MSN ID.  If the ID doesnt exist then it will be created for that script but set to disabled (zero).By using the MSNID it adds a little security to the system (I know its still a hash with a  small chance of double ups), but we also get to store everything pretty much how it already is and still nice, neat and logical while adding this extra functionality.

This would replace the Enabled key in all scripts and just use this one for simplicity of everything, eliminating any choices being needed to be take by people.  Personally I find global settings annoying and it would probably be better to set up the script to write it either way rather than relyig on plus for this.


RE: Scripts not independant of accounts... by Spunky on 10-23-2007 at 04:53 PM

Any changes would mean editing all existed scripts wouldn't it?


RE: Scripts not independant of accounts... by markee on 10-23-2007 at 11:56 PM

That's true but it is not hard to write something small to convert it and it shouldn't effect the runnig of any script (unless they have been silly and edit the reg key for some reason).


RE: Scripts not independant of accounts... by Malekith on 10-24-2007 at 12:14 AM

I dont see how this should be so hard. In the registry just have a list of all the scritps and have two fields: one called users_enabled which will have a comma seperated list of all the users this script is enabled for and then users_show which has a comma seperated list of all the users this script will appear for.

Whenever a new user is signed in they are added to both these fields. They can then go to the Msg+ GUI and when they remove a script there name gets removed from user_show and user_enabled for that script and when they disable it, there name gets removed from user_enabled and re-added if they re-enable.

Alternately you could have the email address of the user and then under that you have scripts and under that have all the scripts. In scripts you have 2 default keys, status which either true or false which declares wheteher its enabled disabled. Rather then deleteing the folder for the script, you would have a key called "deleted" or something, the reason for this is you could easily integrate a settings function into Msg+ scripting which works like so, setting("setting_name", "setting_value");. This way, if the user deletes the script, then reinstalls there settings remain. And this settings function would make things easier for those who dont understand the registry aswell as others.





Sorry if thats hard to understand, if you need clarification, just ask.

/-- Thanks, Malekith


RE: Scripts not independant of accounts... by -dt- on 10-24-2007 at 01:06 AM

quote:
Originally posted by vikke
Edit: It's not ridiculous, you don't seem to know anything about how scripts work. Some scripts may need to run when Messenger starts to apply their features. The best solution I've come up with is to create a new object for Messenger Plus!, called Registry or something.
er what? I dont know how scripts work? pft whatever, did you even read what i wrote, thats why i said to have two different options "global" or "user", so existing scripts could use global (the option would have to default to this) and new scripts could use "user" if they wanted to have per account options

quote:
Originally posted by vikke
Also, you cannot run 2 scripts at the same time with different settings (if it's not programmed that way, some are).
many scripts store their settings in a xml file inside the script directory so they are self contained, but if scripts use the registry they would either have to use the "global" option (which if they didnt specify a <userLevel> then it would automaticly be assumed to be a global script( or add an email key inside their settings and store it under that

edit:
the script wouldn't even have to specify an email address, plus could just return the regkey/email in the MsgPlus.ScriptRegPath property (if the userLevel is set to "user")


quote:
Originally posted by SpunkyLoveMuff
Any changes would mean editing all existed scripts wouldn't it?
no, see above