Disable access to parent chat window when child xml window open - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Disable access to parent chat window when child xml window open (/showthread.php?tid=69194) Disable access to parent chat window when child xml window open by the andyman on 12-05-2006 at 10:27 PM
Is it possible to make it so that a window that is brought up by a script has to be on top of the conversation window that it was brought up by. I.e. the script/new xml window has to closed or another action taken in it which closes it before anything can be done or clicked in the parent (conversation) window. RE: Disable access to parent chat window when child xml window open by Matti on 12-06-2006 at 03:23 PM
quote:So, a good way to do it would be: code:where Wnd is a valid ChatWnd object. As for your closing problem, make sure you call it right: code:Maybe it would be helpful if you post the code snippet where you call the Close function. RE: Disable access to parent chat window when child xml window open by the andyman on 12-06-2006 at 04:54 PM Thanks , I'll have a play around with the info you've given me The window disable works great (although if you go off the windows and then back to the conversation window the xml window isn't on top) but thanks anyway, I'm sure it's fine as it is As for the closing problem this is basically what I've got: code: RE: RE: Disable access to parent chat window when child xml window open by J-Thread on 12-06-2006 at 10:29 PM
quote:Code after the return will not be executed. Make that: code: RE: Disable access to parent chat window when child xml window open by the andyman on 12-07-2006 at 06:17 PM Thanks, but the window is still not closing. I can't see any problem with it either RE: RE: Disable access to parent chat window when child xml window open by Matti on 12-07-2006 at 07:39 PM
code:Why do you want to return something anyway? The scripting documentation says it doesn't need a return value for the OnWndEvent_CtrlClicked event, so why would you? Other than that, I don't actually see the problem... but where did you define that ChatWnd variable? And also, do you have anything in your debugging window? RE: RE: RE: Disable access to parent chat window when child xml window open by the andyman on 12-07-2006 at 08:53 PM
quote:because if one of the options is clicked in the xml windows then the message is send otherwise it isn't quote:in a function OnEvent_ChatWndSendMessage(ChatWnd, Message){ before the code I posted above quote:I'm pretty sure I didn't before but now it does say that 'ChatWnd' is undefined, but only on the lines where I re-enable it . By the looks of it if I get that bit fixed then the whole thing should work . RE: Disable access to parent chat window when child xml window open by Spunky on 12-07-2006 at 09:40 PM
quote: Remember to store the ChatWnd in a global variable (defined outside of a function, if you haven't already) else when you enter a different function it won't exist RE: RE: Disable access to parent chat window when child xml window open by the andyman on 12-08-2006 at 05:54 PM
quote:yeah I worked that out last night but thanks anyway It does seem to be working properly now except only when I use the enter button to send a message, not the "Send" button Also, is there any way to remove the text that is left in the text box in the conversation window? RE: Disable access to parent chat window when child xml window open by CookieRevised on 12-08-2006 at 07:07 PM
quote:You better post the entire script so all this can be checked upon properly. Because it sounds like you're doing some wrong thingie somewhere, maybe... Also, what you actually want is making a dialog "modal". This means it will recieve all input until it closes and only then the "parent" window will be able to recieve input again. I doubt the EnableWindow API is the correct thing to use, that is: the only thing to use... But I may be wrong in this (need todo some looking up). quote:Return an empty string from the ChatWndSendMessage event. RE: RE: Disable access to parent chat window when child xml window open by the andyman on 12-09-2006 at 05:22 PM
Ok here's a beta version of the script (still with bugs). If anyone can figure out what's wrong I will be very grateful. quote:that doesn't seem to be working RE: RE: RE: Disable access to parent chat window when child xml window open by pollolibredegrasa on 12-09-2006 at 05:30 PM I get a "not a valid script file" error when trying to import. Edit: changed the first line to <?xml version="1.0"?>, repackaged and it worked. Edit 2: After importing, I get "Error: Invalid root in registry key". This can be solved by checking if the user is signed in in the OnEvent_Initialize function, and then if they are call the OnEvent_Signin function passing Messenger.MyEmail. This way the user does not have to re-sign in for the script to work. Also, one way to solve your removing the text from the text box problem would be to use ChatWnd.EditText_SetCurSel - look in the scripting doc for more info RE: Disable access to parent chat window when child xml window open by the andyman on 12-09-2006 at 06:51 PM Thanks, I think I've fixed all the n00bish errors you pointed out , and I got the EditText_SetCurSel working. Here's an updated version of the script... RE: RE: RE: Disable access to parent chat window when child xml window open by the andyman on 12-10-2006 at 07:04 PM
quote:is anyone getting this bug with the most recent version (posted directly above)? RE: RE: RE: RE: Disable access to parent chat window when child xml window open by pollolibredegrasa on 12-10-2006 at 07:28 PM
quote: I get the window whether I press enter or use the send button, and it works either way. Still getting the registry error though when I use an account who's settings are not saved. RE: RE: RE: RE: RE: Disable access to parent chat window when child xml window open by the andyman on 12-10-2006 at 09:51 PM
quote:Hmm, thanks for telling me - I'll have (another) look now. RE: RE: RE: RE: RE: RE: Disable access to parent chat window when child xml window op by the andyman on 12-11-2006 at 05:58 PM
quote:I'm pretty sure it should be working, and seems to have worked for other's that have tried it. Here's the code I'm currently using to check for the registry value: code: RE: Disable access to parent chat window when child xml window open by the andyman on 12-11-2006 at 06:30 PM Sorry for all the double postings. Here's a new version which includes an option to only ask you to confirm once when you are first appear offline. |