Shoutbox

Script that disables another - 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: Script that disables another (/showthread.php?tid=70333)

Script that disables another by Orgrim Doomhammer on 01-05-2007 at 04:45 PM

Thread name says it all... I need to know which functions to use to close a script... can anyone help? thx


RE: Script that disables another by Jimbo on 01-05-2007 at 05:12 PM

Similar thread


RE: Script that disables another by CookieRevised on 01-05-2007 at 05:13 PM

quote:
Originally posted by Jimbodude
Similar thread
that's not similar at all. That thread is about something different.

Although, it might be the reason why Orgrim asked it. In other words: the question is far from clear enough to jump to that conclussion, and thus:

quote:
Originally posted by Orgrim Doomhammer
I need to know which functions to use to close a script...
Basicly you can't.

A script either starts running when the user logs in or it isn't.

You can't start/stop a script by another script command. You can however start/stop a script manually by going to the Plus! preferences.

There is maybe a trick (need to test this myself), but that would be quite a dodgy and certainly not recommended way.

The big question is: why do you exactly (and in detail) want to stop a script? What is the reason behind it? (and if possible, post your entire code you already got to clarify this).

I ask this because in many cases you do not need to stop a script, or it is even not the required/correct thing todo from your script to perform a certain action and there might be far better ways to do what you actually want to do..
RE: Script that disables another by Orgrim Doomhammer on 01-05-2007 at 05:16 PM

well, it was because of Stuffplug's commands being blocked by scripts like Message Customizer (I think this is due to colour codes at the beginning of messages), so I'd like to stop it whenever the "!" is typed


RE: Script that disables another by Spunky on 01-05-2007 at 05:23 PM

quote:
Originally posted by Orgrim Doomhammer
well, it was because of Stuffplug's commands being blocked by scripts like Message Customizer (I think this is due to colour codes at the beginning of messages), so I'd like to stop it whenever the "!" is typed

I think that may be being built into Message Customizer (It SHOULD already be IMO) or it can be added quite easily with an if statement

RE: Script that disables another by CookieRevised on 01-05-2007 at 05:27 PM

quote:
Originally posted by Orgrim Doomhammer
well, it was because of Stuffplug's commands being blocked by scripts like Message Customizer (I think this is due to colour codes at the beginning of messages), so I'd like to stop it whenever the "!" is typed
In that case you should not stop scripts at all...

Instead, scripts should never block commands. This means that any script should always return the complete message back when they do not detect a command in it processed by themselfs. And that means either returning the complete unedited message, or not use the return command at all.

If there are scripts, like Message Customizer, which always manipulate the message, then this again means it is a bug in those scripts, and should be fixed instead (to not manipulate the message if they are commands).

However.... There is also another way of dealing this and it would be a way easier way for everybody. Because there are extremely many scripts which use "!" commands also, they too will not function properly with scripts like Message Customizer. And it all comes down to reconizing commands.

And that is the exact reason why one should always use commands starting with "/" and not commands starting with "!", "^", or whatever other format (and I hope everybody who made/published a script using such commands reads this).

This, even includes, imho, StuffPlug. In short: the method of StuffPlug of using "!" commands will actually break many scripts. It is also not what the Plus! user is used too since proper commands start with "/". Thus using "!" commands is not only bad for all those scripts developpers, it is also not good for StuffPlug, since many people will have problems with it.

Hence: StuffPlug should use "/" commands too....

Otherwise, disable all scripts (manually) which will break command lines.

quote:
Originally posted by SpunkyLoveMuff
I think that may be being built into Message Customizer (It SHOULD already be IMO) or it can be added quite easily with an if statement
tbh, there is nothing to be fixed. "!"-commands are actually not commands, but just text. That is how Plus! deals with it and that should be the way any other script developper should deal with it.

So, Message Customizer is actually correct in not dealing them as commands.

One can not expect that all scripts are made compatible with all kinds of rogue plugins, addons, scripts, etc which do not follow the standard.

The solution is extremely simple: follow the standard: commands start with "/", anything else are not considered commands.
RE: Script that disables another by Orgrim Doomhammer on 01-05-2007 at 05:57 PM

thank you all guys... I've just added a piece of code in message customizer and now it works fine... i'll suggest it to Markee and Nanafreak ASAP


RE: Script that disables another by CookieRevised on 01-05-2007 at 06:07 PM

Instead you should suggest to anybody else who made scripts with "!" commands, to use "/" commands instead.

It is not Message Customizer (and the likes) which should fix this, it are all those scripts which use "!" commands which should be fixed (including StuffPlug addon).

imho


RE: Script that disables another by Orgrim Doomhammer on 01-05-2007 at 06:19 PM

Well, you're right but it was a faster solution to modify a script myself and give the solution to its creators instead of asking all those who made scripts with "!" commands to turn them into "/" commands...


RE: Script that disables another by Spunky on 01-05-2007 at 06:32 PM

quote:
Originally posted by CookieRevised
It is not Message Customizer (and the likes) which should fix this, it are all those scripts which use "!" commands which should be fixed (including StuffPlug addon).

But we should always anticipate idiocy :p It's a problem I thought would have occured earlier tbh, with the amount of ! commands... i'm surprised it's only been mentions, because of StuffPlug.


RE: RE: Script that disables another by CookieRevised on 01-05-2007 at 07:59 PM

quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by CookieRevised
It is not Message Customizer (and the likes) which should fix this, it are all those scripts which use "!" commands which should be fixed (including StuffPlug addon).
But we should always anticipate idiocy :p
to a certain level...

It would be impossible to take in account all addons, scripts, etc which do something alternativly. So far I'v seen commands starting with "!", "^", "$" and even commands which end in "!", and who knows what else... All this because people either simply don't know that you can make "/" commands, or think it will always render the message "command is not reconized", or because they want to be different...

The reason why Windows is so full of wierd and inlogic stuff or things which are/should have been long obsolete, but is still used (eg: Special Folders reg key) is because of this "take in account idiocy". And because it is still there, people (mis)use it and learn the wrong thing (eg: again Special Folders reg key). The same is just happening with those "!" commands...

---------

Orgrim, what you also can do instead of fixing every script you have which might alter messages, is making a small script with "/" aliases for the StuffPlug "!" commands (though I hope TB makes the commands starting with "/" instead, if possible).
RE: Script that disables another by NanaFreak on 01-06-2007 at 03:18 AM

markee and i will put this in when stuff plug is not a beta..... and also if stuff plug used (as you said cookie) a "/" for the commands it would be much better.

i had an idea that you would be able to do it (i think).... and that is by using a quick text with a / at the start. but it might not work.


RE: Script that disables another by TheBlasphemer on 01-06-2007 at 03:26 AM

Alright, just to defend myself here, I don't like the ! commands either. However, StuffPlug commands are parsed after Plus! commands, and as such if I use / commands, Plus! will catch them first and throw an error message :/
Isn't all that handy for users :(
I'm still working on a workaround, but for now you'll have to settle for !


RE: Script that disables another by roflmao456 on 01-06-2007 at 03:47 AM

quote:
Originally posted by TheBlasphemer
However, StuffPlug commands are parsed after Plus! commands

maybe Patchou can add a function to Plus! to wait for other addons to parse their commands :P



EDIT: Okay now these posts are getting us off topic here! lol

i just know that you can disable the script by plus! preferences.
i dont think a script can disable another script... that sounds odd..