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

Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
[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
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: [Release] Change Me!
quote:
Originally posted by CookieRevised

   
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.

would be nice if there where... i would be alot easier when using alot off scripts...
11-22-2006 03:08 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: [Release] Change Me!
quote:
Originally posted by foaly
quote:
Originally posted by CookieRevised
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.
would be nice if there where... i would be alot easier when using alot off scripts...
yeah true...

Although logic dictates is easly (and that is also the 'guideline' I use): "Plus! uses slashes for all its commands, so I do to in my scripts because that is what the user is used to (and not "!", "^", "-" or any other character I've seen in scripts being used)."

Remote command are commands too... And having "!dp" and "/dp" may be confusing for people.

The idea is nice, but the fact remains that many scripts use "!" for normal commands too, hence the possible confusion. If there were no scripts using "!" for normal commands and everybody did the same, then the idea of making a destinction between commands and remote commands is great. But unfortunatly this isn't the case...

All it takes to let a command starting with a slash being reconized as a command is returning something (usually an empty string) in the ChatWndSendMessage event.

This post was edited on 11-22-2006 at 03:24 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-22-2006 03:20 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [Release] Change Me!
Well, I took what you said on board Cookie and have edited the script to read from the registry only once (during OnEvent_Initialize) and to write to the registry only when the "OK" button is pressed in the settings window.

This is more of an optimization than an update (except there is also now a /dp command to change your own dp as if 2 people had the script they would both change)

.plsc File Attachment: ChangeMe!.plsc (115.58 KB)
This file has been downloaded 171 time(s).
<Eljay> "Problems encountered: shit blew up" :zippy:
11-22-2006 11:44 PM
Profile PM Find Quote Report
TheGuruSupremacy
Full Member
***

Avatar

Posts: 367
Reputation: 19
33 / Male / Flag
Joined: Nov 2006
RE: RE: [Release] Change Me!
quote:
Originally posted by SpunkyLoveMuff
Well, I took what you said on board Cookie and have edited the script to read from the registry only once (during OnEvent_Initialize) and to write to the registry only when the "OK" button is pressed in the settings window.

This is more of an optimization than an update (except there is also now a /dp command to change your own dp as if 2 people had the script they would both change)



Nice....even if it's useless but very cool:):)...Thanks!...thank also cookie:you are always helpful!!!!:D:D:D:D:D:D:D [LoL]
11-23-2006 03:25 PM
Profile PM Find Quote Report
elektra
Full Member
***

Avatar
aka quacky

Posts: 210
Reputation: -3
– / Male / –
Joined: Jul 2006
RE: [Release] Change Me!
Good script, been using it for quite a while now and i was wondering how i work the image feature, when i select it nothing pops up or anything.
so could some one help me...
~thanks~
[Image: ps3_forum2.jpg][Image: x360_forum2.jpg]
11-27-2006 03:42 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
RE: [Release] Change Me!
quote:
Originally posted by quacky
Good script, been using it for quite a while now and i was wondering how i work the image feature, when i select it nothing pops up or anything.
so could some one help me...
~thanks~
Go to C:/program filesMessenger plus live/scripts/Change Me/Images
and then change to default.bmp to any 96x96 bmp of your choice
Don't forget to rename it 'default' though
11-27-2006 03:45 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [Release] Change Me!
They need to be BMP format (or I think DIB?). This new version allows you to select pics to use from a dialog box and also lets you choose colours/font from other dialogs.


This post was edited on 11-27-2006 at 03:52 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
11-27-2006 03:49 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
RE: [Release] Change Me!
quote:
Originally posted by SpunkyLoveMuff
They need to be BMP format (or I think DIB?). This new version allows you to select pics to use from a dialog box and also lets you choose colours/font from other dialogs.
When are you going to release this new version?
11-27-2006 03:50 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [Release] Change Me!
Well, I did attach it, then I edited it to attach it again after it didn't work... Still not there... So it'll be up as soon as it will upload :s
<Eljay> "Problems encountered: shit blew up" :zippy:
11-27-2006 03:53 PM
Profile PM Find Quote Report
Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
« 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