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.