What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Is there a script to.....?

Pages: (3): « First « 1 [ 2 ] 3 » Last »
Is there a script to.....?
Author: Message:
lu_benja
Junior Member
**


Posts: 43
Joined: Sep 2005
O.P. RE: Is there a script to.....?
I meant to choose the time and date
09-13-2006 07:11 PM
Profile E-Mail PM Find Quote Report
vaccination
Veteran Member
*****

Avatar

Posts: 2513
Reputation: 43
32 / Male / –
Joined: Apr 2005
RE: Is there a script to.....?
quote:
Originally posted by Jesus
lol thought he meant after a specified amount of time:P
maybe I'll do that later if no one else volunteers

Yeah maybe, TBH we need him to come back and clear this up :P
[Image: jumbled.png]
09-13-2006 07:12 PM
Profile PM Find Quote Report
lu_benja
Junior Member
**


Posts: 43
Joined: Sep 2005
O.P. RE: Is there a script to.....?
someone can do the script?
09-14-2006 01:46 PM
Profile E-Mail PM Find Quote Report
crank
Full Member
***

Avatar
Failed to come back here :(

Posts: 304
Reputation: 17
34 / Male / Flag
Joined: Mar 2004
Status: Away
RE: Is there a script to.....?
Should be easy enough, i just do not feel like starting on it.
I haven't been active here in ages.
If you're wondering who i am, read my reputations. I used to make plugins, skins and spam the IRC channels here back in the good old days before Windows Live.
09-15-2006 09:29 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Is there a script to.....?
quote:
Originally posted by 134jimbodude
That should work but i haven't tested it
Try not to post scripts/snippets if you didn't tested them....

Posting not working scripts can confuse people even more and people willing to learn scripting will learn the wrong things, etc.

(you actually pointed that out to me once :p;)))


quote:
Originally posted by Jesus
lol thought he meant after a specified amount of time:P
Before making scripts for people, always make sure you make what is been asked for, or first ask for more details.
eg: "# key and = key".

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

PS: Jesus (or anyone): you also might wanna read this post regarding timers:
quote:
Originally posted by CookieRevised in "[release] Who's online"

Extremely important note:

Each and every script that uses timers to manipulate or check user related stuff should check if the same user is still signed in when the timer triggers!!!

It should check if it is still the same current user who is signed in and thus only perform the action if the user is the same as the one which started the timer.

Failing todo this will cause many unwanted errors and script behaviours when:
- the user signs out when a timer is still active
- a new user signs in before the timer is triggered and the action when the timer triggers is something like blocking a contact, changing status, retrieving contacts, etc...

All this because timers do not reset and aren't deleted when somebody signs out or when somebody else signs in.


Extremely many scripts make these faults...

Another, and sometimes better/more elegant, solution for the above problem (that is: if possible for the particular script) is to explicitly delete the timer when the user signs out.
Although 134jimbodude's code wouldn't work, he did take this in account as he checked the email address of the signed in user.

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

Also another thing (or actually the same thing as above if you think about it) which makes this script not so strait forward as you might think is that scripts keep running and will not be restarted when other users sign in.

This makes that you should take in account that different users can set different sign out times. In other words, this script should save and load its setting (the set time) in a user specific way (ps: don't use the user's email address for this but rather the user's userid because of security reasons).

This post was edited on 09-15-2006 at 11:38 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-15-2006 11:18 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Is there a script to.....?
code:
var now;
var signouttime;
function GetDate(){
var D = new Date();
var Hours = Addzero(D.getHours());
var Seconds = Addzero(D.getSeconds());
var Minutes = Addzero(D.getMinutes());
var Seconds = Addzero(D.getSeconds());

var Day = Addzero(D.getDate());
var Month = Addzero(D.getMonth() + 1);
var Year = Addzero(D.getYear());

now = Month+'/'+Day+'/'+Year+' - '+Hours+'/'+Minutes+'/'+Seconds;
//Debug.Trace(now);
}

function Addzero(va)
{
if (va<10)
  {va="0" + va}
  return va
}

function OnEvent_Timer(TimerId)
{
switch (TimerId){
case "Signout":
if (Messenger.MyStatus != 0) {
GetDate();
if(now == signouttime){
Messenger.Signout();
}
}
MsgPlus.AddTimer("Signout", 1000);
break;
}
}
MsgPlus.AddTimer("Signout", 1000);

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.substr(0,12) == "/signouttime"){
signouttime = Message.substr(13)
Debug.Trace(signouttime);
return "";
}
}

function OnGetScriptCommands()
{
var commands = "<ScriptCommands>"
commands += "  <Command>"
commands += "    <Name>signouttime</Name>"
commands += "    <Description>Signs you out on the specified time and date.</Description>"
commands += "    <Parameters>MM/DD/YYYY - HH/MM/SS;</Parameters>"
commands += "  </Command>"
commands += "</ScriptCommands>"
return commands
}

Just made that. Use /signouttime MM/DD/YYYY - HH/MM/SS with full values to define the date and time to sign out on [Image: xso_cheesy.gif].

This post was edited on 09-15-2006 at 12:40 PM by Felu.
09-15-2006 12:05 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Is there a script to.....?
quote:
Originally posted by -!Felu!-
code:
function Addzero(va)
{
if (va<10)
  {va="0" + va}
  return i
}

Err... what the heck is the i-variable supposed to be? ^o)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-15-2006 12:38 PM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Is there a script to.....?
quote:
Originally posted by Mattike
quote:
Originally posted by -!Felu!-
code:
function Addzero(va)
{
if (va<10)
  {va="0" + va}
  return i
}

Err... what the heck is the i-variable supposed to be? ^o)
the i viewed (i) on the forums so i changed it forgot it there :$.
Fixed (Y)
09-15-2006 12:39 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Is there a script to.....?
quote:
Originally posted by -!Felu!-
the i viewed (i) on the forums so i changed it forgot it there :$.
Fixed (Y)
Heh, okay then. :P
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-15-2006 12:44 PM
Profile E-Mail PM Web Find Quote Report
lu_benja
Junior Member
**


Posts: 43
Joined: Sep 2005
O.P. RE: Is there a script to.....?
I don't understand what you were talking about.. anyway..did someone do the script?
09-15-2006 08:02 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » 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