What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [REQUEST] Sign on alarm

Pages: (2): « First « 1 [ 2 ] Last »
[REQUEST] Sign on alarm
Author: Message:
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [REQUEST] Sign on alarm
right after dinner
[Image: gybouserbar6hc.gif]
09-04-2006 11:04 PM
Profile PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: [REQUEST] Sign on alarm
Haha, that's a cool script. How can I change the picture?
Twitter: @ChrisLozeau
09-04-2006 11:48 PM
Profile PM Find Quote Report
Zeh
Full Member
***

Avatar
DC 4 EVER!

Posts: 136
Reputation: 1
36 / Male / –
Joined: Aug 2006
RE: [REQUEST] Sign on alarm
You could place the image you want in the \scripts\alarm\images and name it alarm.jpg replacing the image there. Don't know what will happen if the image is bigger then the window. Some scripts that use text or images stop working if the text or the image are bigger then the window size.
[Image: Zeh.png][Image: x copy.jpg]
| Windows Live Messenger Beta Tester | Windows Live Mail Beta Tester |
09-04-2006 11:54 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [REQUEST] Sign on alarm
you can edit the xml file to change the height and width

i'll have another release out tonight. i've replaced the image with http://en.wikipedia.org/wiki/Image:Windup_alarm_clock.jpg because it's public domain (among a whole lot of other features).
if anyone has a better image that's freely useable please post it.

edit: newer version attached. supports multiple contacts and has enable/disable.
you have to enable it from the script menu before it will work
the script stores the enabled/disabled state in registry
and disabling it will kill the alarm

this isn't the last build tonight, i'm just going to watch prison break.
i'll have an interface for inputting the contacts' emails put it tonight. promise.
also on the to-do list:
- put the contact's name at the top of the alarm window
- open a convo with said contact when you click the alarm

.plsc File Attachment: alarm1.plsc (66.58 KB)
This file has been downloaded 138 time(s).

This post was edited on 09-05-2006 at 01:21 AM by AberNStein.
[Image: gybouserbar6hc.gif]
09-05-2006 12:50 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [REQUEST] Sign on alarm
some quick pointers (Im in a hurry):

* Script pack didn't imported, contained an error (also make your wml files unicode and add the proper header to scriptinfo.xml)

* Ident your code with tabs, add some lines between functions.

* Dont use Messenger.MyEmail for storing information, use Messenger.MyUserID instead (if you can, never put emails directly in the registry as this forms a possible security/privacy risk)

* There is no need for the variable ringing and assigning it 1 or 0; you can leave all those lines and checks out of it.

* Since you only use 1 timer, no need for checking the TimerId; you can leave that check out

* No need for checking the catch error event (if (e != 0)), it will always be something different than 0, otherwise it wouldn't be an error.

* Functions OnGetScriptMenu(), toggle and OnEvent_ContactSignin all miss an error catching (each time you read/write to the registry you must use error catching).

* You didn't declare the variable enabled as a global variable
       
* Unless you're going to use other menu options, checking on the menu id isn't needed

* Using a normal string to contain the email addresses might result in errors when you use eml.indexOf(TheEmail)>-1. Better make eml an array. You can also iterate thru the array more easly.

* since you use a timer in your script, read the important notes about timers here: CookieRevised's reply to [release] Who's online

* other optimizations exist though

;)

This post was edited on 09-05-2006 at 01:51 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-05-2006 01:28 AM
Profile PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: RE: [REQUEST] Sign on alarm
thanks for wading through my code. i know i'm a sloppy programmer.
quote:
Originally posted by CookieRevised
some quick pointers (Im in a hurry):

* Script pack didn't imported, contained an error (also make your wml files unicode and add the proper header to scriptinfo.xml)

sorry. dunno what happenned there
quote:
Originally posted by CookieRevised
* Ident your code with tabs, add some lines between functions.

fine i'll indent it. i'm not commenting though.
quote:
Originally posted by CookieRevised
* Dont use Messenger.MyEmail for storing information, use Messenger.MyUserID instead (if you can, never put emails directly in the registry as this forms a possible security/privacy risk)

fix'd in next version.
quote:
Originally posted by CookieRevised
* There is no need for the variable ringing and assigning it 1 or 0; you can leave all those lines and checks out of it.

that's a relic from an earlier version. delet'd in next version
quote:
Originally posted by CookieRevised
* Since you only use 1 timer, no need for checking the TimerId; you can leave that check out

remov'd in next version
quote:
Originally posted by CookieRevised
* No need for checking the catch error event (if (e != 0)), it will always be something different than 0, otherwise it wouldn't be an error.

not my code. i copy/pasted that from a script repository
quote:
Originally posted by CookieRevised
* Functions OnGetScriptMenu(), toggle and OnEvent_ContactSignin all miss an error catching (each time you read/write to the registry you must use error catching).

good point. add'd in next version
quote:
Originally posted by CookieRevised
* You didn't declare the variable enabled as a global variable
   
in next ver.
quote:
Originally posted by CookieRevised   
* Using a normal string to contain the email addresses might result in errors when you use eml.indexOf(TheEmail)>-1. Better make eml an array. You can also iterate thru the array more easly.

originally i had it in an array, but i thought that looping through it to search it would be bad if there were a lot of items. a fast array searching function would merge it into a string, so i just left it as a string. back to looping through the array it is.

thanks a lot.

edit: also in the next version will be checking whether it's the same user when the timer triggers and also not doing stuff if boss mode is on.
---------
EDIT:
alarm v. 0.2
-click 'choose contacts' on the menu to choose what contacts alarm applies to
-cookierevisited's suggestions integrated
still to come:
-contact's email in the alarm
-clicking the alarm opens a convo

there are quite probably a bunch of things that could be streamlined in my code. right now i'm going for functionality. this build should run properly. that's what matters for now.
oh and by the way i'm new to xml so if anyone wants to make the interface windows prettier or whatever feel free to post your changes.

this is the last build tonight. i'll hopefully finish it tomorrow night.

edit:
known bugs:
with multiple alarms open, only the most recent one will close, and the ringing will stop. also, disabling the alarm will only kill the most recent window.

i'm starting to think that the programming required for making the alarms show the emails and stuff is beyond me.

.plsc File Attachment: alarm.plsc (64.11 KB)
This file has been downloaded 131 time(s).

This post was edited on 09-06-2006 at 09:53 PM by AberNStein.
[Image: gybouserbar6hc.gif]
09-05-2006 01:48 AM
Profile 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