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