What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] Change Me!

[Release] Change Me!
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: [Release] Change Me!
quote:
Originally posted by SpunkyLoveMuff
I've got a feeling the error has somehting to do with the dll file not being registered properly either due to a regsvr32 error or the file not being moved to the System32 folder.
regsvr32 doesn't have bugs and DLLs don't need to be placed in the system32 folder (I even recommend not to place them there to reduce the left-over files when scripts are removed, or Plus! uninstalled).

I see you go about this in your script in the wrong way....
Simply include the DLL in the script packet (and ScriptInfo.xml) and let Plus! install and register the DLL. Do not do what you do in your current script, as that is most likely exactly what produces the error.

As for the DLL itself, you don't need it at all actually. There are Windows APIs which can do the same thing. Of course, it would make things a lot more complicated for the programmer ;)

quote:
Originally posted by SpunkyLoveMuff
/dpyou wouldn't work as slashes denote a command and so don't get sent and also trigger plus's error message about being an incorrect command unless it's added to the OnGetScriptCommands function and you add return ""; to the ChatWndSendMessage event.
OnGetScriptCommands has got nothing todo with that "isn't a command" error. OnGetScriptCommands is only responsible for what you see in the command window when you just pressed "/", that's all...

All you need to do to let Plus! reconize your command as a command is  telling Plus! that you've handled the command (or whatever) so Plus! wont show the error. This is done by simply returning an empty string (or something else for that matter) in the ChatWndSendMessage event.

quote:
Originally posted by SpunkyLoveMuff
Generally, slashes are for your own commands, exclamation marks are for "remote" commands
There are no 'rules' or guidelines at all in this. All I could recommend is using slashes for everything as that is also what Plus! uses and thus what the user is used to.

--------------------

Also the error catching you do when reading/writing to the registry in the initialize event is a wrong way of doing it.

You only do error catching in the initialize event, while you should do it for every registry read/write (in the Read and WriteRegistry functions).

What you do now can lead to other errors. eg: what if the reading of the registry fails because the user don't have access to it or because of some other reason than the settings not being there yet? Then you try again to write stuff to the registry, but since accessing the registry produced an error, this too will fail...

So, this has also consequences in the way you read and set the settings of your script. What you do now is a bit inlogic. I don't see any global settings variable either.

Reading and writing settings should go like this:

1) When the script initializes you should try to read the current settings. If this fails, you must not write to the registry, but simply take the hard coded default values in memory in your global settings variables.

2) When the user opens a preferences window, the window should reflect the current settings in memory. Again, nothing is read or written to the registry yet. Also, the current settings are copied to temporary settings.

3) When the user changes settings in the preferences window, again nothing is written to the registry!, instead the temporary settings is the only thing which changes.

4) When the user presses 'cancel', nothing is again written or read from the registry. In fact, nothing at all is done and the temporary settings are just discarded.

5) When the user presses 'ok' or 'apply' the temporary settings are written to the registry and copied to the current global settings in memory.


All this also reduces the constant reading and writing to the registry which is what is happening now in the current script.

This post was edited on 11-22-2006 at 02:56 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-22-2006 02:24 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Release] Change Me! - by Spunky on 11-20-2006 at 09:17 PM
RE: [Release] Change Me! - by Jimbo on 11-20-2006 at 09:21 PM
RE: [Release] Change Me! - by DarkMe on 11-20-2006 at 09:24 PM
RE: [Release] Change Me! - by Spunky on 11-20-2006 at 09:30 PM
RE: [Release] Change Me! - by DarkMe on 11-20-2006 at 09:35 PM
RE: [Release] Change Me! - by Jimbo on 11-20-2006 at 09:37 PM
RE: [Release] Change Me! - by elektra on 11-20-2006 at 10:01 PM
RE: [Release] Change Me! - by Spunky on 11-20-2006 at 10:03 PM
RE: [Release] Change Me! - by deAd on 11-20-2006 at 10:09 PM
RE: [Release] Change Me! - by Spunky on 11-21-2006 at 03:46 PM
RE: [Release] Change Me! - by jameslives on 11-21-2006 at 04:20 PM
RE: [Release] Change Me! - by EBFL on 11-21-2006 at 04:23 PM
RE: [Release] Change Me! - by Spunky on 11-21-2006 at 04:37 PM
RE: RE: [Release] Change Me! - by CookieRevised on 11-22-2006 at 02:24 PM
RE: [Release] Change Me! - by capitocapito on 11-21-2006 at 05:04 PM
RE: [Release] Change Me! - by Spunky on 11-21-2006 at 05:07 PM
RE: [Release] Change Me! - by capitocapito on 11-21-2006 at 05:24 PM
RE: [Release] Change Me! - by Spunky on 11-21-2006 at 05:28 PM
RE: [Release] Change Me! - by Jimbo on 11-22-2006 at 02:00 PM
RE: [Release] Change Me! - by Spunky on 11-22-2006 at 02:04 PM
RE: [Release] Change Me! - by Jimbo on 11-22-2006 at 02:08 PM
RE: [Release] Change Me! - by foaly on 11-22-2006 at 03:08 PM
RE: RE: [Release] Change Me! - by CookieRevised on 11-22-2006 at 03:20 PM
RE: [Release] Change Me! - by Spunky on 11-22-2006 at 11:44 PM
RE: RE: [Release] Change Me! - by TheGuruSupremacy on 11-23-2006 at 03:25 PM
RE: [Release] Change Me! - by elektra on 11-27-2006 at 03:42 PM
RE: [Release] Change Me! - by Jimbo on 11-27-2006 at 03:45 PM
RE: [Release] Change Me! - by Spunky on 11-27-2006 at 03:49 PM
RE: [Release] Change Me! - by Jimbo on 11-27-2006 at 03:50 PM
RE: [Release] Change Me! - by Spunky on 11-27-2006 at 03:53 PM
RE: [Release] Change Me! - by Jimbo on 11-27-2006 at 03:54 PM
RE: [Release] Change Me! - by Spunky on 11-27-2006 at 03:56 PM
RE: [Release] Change Me! - by Jimbo on 11-27-2006 at 03:57 PM
RE: [Release] Change Me! - by elektra on 11-27-2006 at 04:03 PM
RE: [Release] Change Me! - by Jimbo on 11-27-2006 at 04:07 PM
RE: [Release] Change Me! - by Spunky on 11-28-2006 at 12:49 AM
RE: RE: [Release] Change Me! - by deAd on 11-28-2006 at 12:53 AM
RE: [Release] Change Me! - by dylan! on 11-29-2006 at 02:48 AM
RE: [Release] Change Me! - by thahim on 12-04-2006 at 06:04 AM
RE: [Release] Change Me! - by Spunky on 12-04-2006 at 11:55 AM


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