Nice idea and thingie
...
some things though:
* function ShowConfigWindow(){
check if config window isn't already showing
(too bad it doesn't make me that tea I wanted at the moment)
* function OnGetScriptMenu(){
Config opens a new window, so add "..."
* function OnEvent_MenuClicked(MenuItemId){
- no need for checking on the menuid when you use only 1 item
- you're missing a closing } in that function
* function SaveSettings(){
put everything in a error handling routine because Messenger.MyEmail will not always be defined (eg: user is logged out while config window is still showing).
* var OnEvent_Initialize = Startup;
Initialize (and thus Startup()) can/will be called before Messenger.MyEmail is defined. Thus use
if(Messenger.MyStatus > 1).
* function Startup(){
It is possible that that registry key doesn't exist, so again error checking (default DWORD value is 1). But better yet:
* Check on EnablePreviousRecall each time, since this can be changed while user is logged in. To avoid reading regisrty each time a key is pressed, maybe read it only when a chat window is created. Do
if(RecallEnabled == 1) instead of using '===' because, maybe, there is a change someone screwed up and saved the key as a string.
* When user uses other keys than alfanumerical, etc (eg: copy/paste and stuff), the script isn't in 'Waiting' state anymore and thus quote isn't send as a quote. But that's hard to fix properly and 100% and it is something minor anyways.
* When user uses mouse to paste some text after a quote has been send for exalmple, the new text will also be send as a quote. Add
Waiting=false in OnEvent_ChatWndSendMessage().
* When another user signs in to Messenger, the default prefix/suffix values are not loaded. aka: don't define default values in global scope of the script but in the LoadSettings function.
* Make Waiting variable chat-specific so that when you select a quote and temporarly chat in another window, you can still send the quote as a quote in the first one.
* love the comments
PS: for those who want to know, in Messenger Plus! 3 the registry key to add/change a prefix or suffix: HKCU\Software\Patchou\MsgPlus2\your@email.com\Preferences\QuoteFormat
see Help: Registry Tweaks