What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [release] My MsgPlus!Live Script

Pages: (2): « First [ 1 ] 2 » Last »
[release] My MsgPlus!Live Script
Author: Message:
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. [release] My MsgPlus!Live Script
I've been playing aroud a bit with the new scripts feature of messenger plus live, its nothing special its jsut very basic and was just me playing around basicly but try it out anyway and let me kno what ya think, and any errors, or perhaps what i could add/change.

Commands
#inbath - set status to “yourname { inbath }”, send open chat windows “Im going to have a bath” message
#toilet- set status to “yourname { in toilet }”, send open chat windows “Im going to th toilet” message
#bathroom - set status to “yourname { in bathroom }”, send open chat windows “Im in the bathroom” message
#eat - set status to “yourname { eat }”, send open chat windows “Im going to eat” message
#sleep - set status to “yourname { sleeping }”, send open chat windows “Im going to sleep” message
#smells namehere - send message “namehere smells” to current chat
#rocks namehere - send message “namehere rocks” to current chat
#slap - send “yourname slaps you!” message to current chat
#toast yourcontent - displays a toast with “yourcontent”

Download: http://www.anonymousjon.co.uk/download/Usefull%20Script.plsc
On my blog: http://www.anonymousjon.co.uk/blog/?p=12

This post was edited on 06-27-2006 at 09:33 PM by JonnyT.
06-27-2006 09:30 PM
Profile E-Mail PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
32 / Male / Flag
Joined: Dec 2004
RE: [release] My MsgPlus!Live Script
Nice basic script :)
Twitter: @ChrisLozeau
06-27-2006 09:57 PM
Profile PM Find Quote Report
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. RE: [release] My MsgPlus!Live Script
thanks :P

yup its just me layin around basicly. Im gonna improve it fix a few bits and hoefully add custom commands for the #inbath, #sleep etc
06-27-2006 09:59 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [release] My MsgPlus!Live Script
looks good for your first script... Though you have some things you might want to correct:

code:
case 'MnuTest' :
        wnd.SendMessage('{ test goes here }');return;
        return;
You have 1 "return;" too many here... delete the one after the sendmessage line.

code:
case 'MnuInfo' :
(...)
What is shown here can also be shown with the (!VER) tag. Same with the part which handles the "#info" command.

code:
case 'MnuBath' :
        (...)
        if (IAm == "bath") {
                var ValRegPathIAm = MsgPlus.ScriptRegPath + "IAm";
                (...)
        }
        else
        {
                (...)
                var ValRegPathIAm = MsgPlus.ScriptRegPath + "IAm";
                (...)
        }
You already have "var ValRegPathIAm" defined before the if then else statement, no need to do it again in the "if" and again in the "else". Those lines can be deleted.

The same goes for "case 'MnuBath'" , "case 'MnuSleeping'", "case 'MnuEating'". And same goes for the parts of the equivalent commands.

--

And in general: you can make that script really extremely shorter.
(ps: and with this I don't mean the things I've said above. This is an additional thing you can do to the stuff listed above)

--

;)





EDIT:
quote:
Originally posted by JonnyT
(...) and hoefully add custom commands for the #inbath, #sleep etc
before you do that, find the ways to make your script shorter. It would be far more easier to add stuff to the shorter version than to the existing version.

This post was edited on 06-27-2006 at 10:12 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-27-2006 10:09 PM
Profile PM Find Quote Report
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. RE: [release] My MsgPlus!Live Script
thanks for the tips Cookie, I will definatly be making the script shorter, and fixing a few small errors before i even atempt to add custom commands.

On that point, at the moment im using the registry to store a couple of things but I was thinking the best way to store the custom commands would be in either a text or xml file, but how would I go about reading/writing to an external text file from a config window. Any help would be great :)
06-27-2006 10:14 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [release] My MsgPlus!Live Script
The registry is the best way. :P
06-27-2006 10:29 PM
Profile PM Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
RE: [release] My MsgPlus!Live Script
quote:
Originally posted by deAd
The registry is the best way. :P
Not necessarily. If the user that installed the script does not have access to the registry, then the script won't even run.
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
06-28-2006 12:20 AM
Profile PM Web Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
36 / Male / –
Joined: May 2004
Status: Away
RE: RE: [release] My MsgPlus!Live Script
quote:
Originally posted by JonnyT
On that point, at the moment im using the registry to store a couple of things but I was thinking the best way to store the custom commands would be in either a text or xml file, but how would I go about reading/writing to an external text file from a config window. Any help would be great :)

http://mpwiki.h-master.net/Text_Files

Posted on mess.be too, but just in case ya miss it. :)
06-28-2006 12:26 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [release] My MsgPlus!Live Script
quote:
Originally posted by .Lou
quote:
Originally posted by deAd
The registry is the best way. :P
Not necessarily. If the user that installed the script does not have access to the registry, then the script won't even run.
which would be very rare seeing the location (HKCU and not HKLM) where script settings are stored. I also doubt that someone without access to that location would even be able to properly run Plus!Live for that matter (can be, but very unlikely).

Also, if someone does not have access to the registry, I'm certain you can't even run scripts (unless you enable them again each and every time you start up Messenger as HKCU is also the location where Plus! stores if a script is enabled or not).

And for some simple settings like this I think using XML is a bit over the top (IMHO).

All in all, there is absolutely no reason why you shouldn't be using the registry for such small settings.

This post was edited on 06-28-2006 at 12:54 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-28-2006 12:50 AM
Profile PM Find Quote Report
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. RE: [release] My MsgPlus!Live Script
I've made alot of improvements to the code, and changed a couple of things, the "Im going to sleep" etc mssages are now sent to all open chat windows, and a new little feature which saves the last message your sent simply type #s1 to use it.

Im still trying to work out the custom messages. Im not sure how to do it I thought somthing like have each line as a new command like this:
#command | message sent to contact | set name to
but should this be done using text or registry. and would you do it/split the data for reading?

download http://www.anonymousjon.co.uk/download/Usefull Script.plsc

This post was edited on 06-29-2006 at 04:38 PM by JonnyT.
06-29-2006 04:28 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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