Shoutbox

help me please =/ - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: help me please =/ (/showthread.php?tid=29628)

help me please =/ by LiMãØ on 08-07-2004 at 02:47 PM

I have one dialog (made in VB6) wich have one textbox... I'd like to send the text I wrote on this textbox to the chat window... can anyone help me???

tnks


RE: help me please =/ by Choli on 08-07-2004 at 06:32 PM

Well, if that dialog is shown in the ParseCommand, ParseTag or ReceiveNotify functions of the plus api, then you just have to copy the text in the textbox into the sResult (or similar name,  don't remember) variable of those functions.

However if you need to send any text when you want, you should use the messenger api, although you can also use the sendkeys function simulate that the user has pressed the keys in the conversation window.


RE: help me please =/ by LiMãØ on 08-09-2004 at 07:11 PM

yes, the dialog is show in the ParseCommand (/xcoder)... but I don't have any idea how to copy the text of the textbox.... can you explain me?

tnks


RE: help me please =/ by RaceProUK on 08-09-2004 at 10:30 PM

sResult = Form.TextBox.Text tends to work. Of course, you'd have to change 'textBox' to the name of your text control, and Form to the name of the form.
Can't guarantee this will work though: if you close the form and then try to access one of its controls, it may not work.
So, try it and see.


RE: help me please =/ by LiMãØ on 08-10-2004 at 03:59 AM

well.... it works.... but first I have to close the dialog to send the text of the textbox.... Is there anyway to send the text without close the dialog?? please, help me =/

tnks for the help


RE: help me please =/ by RaceProUK on 08-10-2004 at 09:58 AM

Not that I know of I'm afraid.


RE: help me please =/ by LiMãØ on 08-10-2004 at 10:48 PM

well.... I'll change my project.... :(

tnks for the replies and the help....


RE: help me please =/ by Choli on 08-12-2004 at 07:53 PM

quote:
Originally posted by LiMãØ
Is there anyway to send the text without close the dialog??
yes, you can, however it's a bit more complex. You have to show the dialog and wait until you press some button or whatever at the dialog. Then copy the sresult and return from the function.
RE: help me please =/ by Stigmata on 08-12-2004 at 08:07 PM

text in the textbox is automaticly saved, /coder opens the file as text and its sent :)


RE: help me please =/ by Choli on 08-13-2004 at 05:16 PM

quote:
Originally posted by LiMãØ
can you show me an example???
it'd be something like this: (now i don't have VB here, so this will be a mix between VB code and pseudocode)

' inside parsecommand...
not_yet=true ' this is a global variable
form1.show vbmodal, screen.activeform
while not_yet
wend
sResult = Form1.text1.text
return

'inside form1...
sub commandbutton_enter_onclick()
not_yet = False
end sub


that's all, however that's a dodgy thing of doing it. There are much better ways (and also more complicated) but that should work ^o)
RE: help me please =/ by LiMãØ on 08-14-2004 at 03:28 AM

didnt work :(


RE: help me please =/ by Mnjul on 08-14-2004 at 04:07 AM

I believe "Form.Show vbModal" returns only after the form is hided or unloaded, Choli ;)


Well, this might work:

' inside parsecommand...
not_yet=true ' this is a global variable
form1.show vbmodeless, screen.activeform
while not_yet
DoEvents ' You don't want to hang Messenger here, don't you
wend
sResult = Form1.text1.text
end function

'inside form1...
sub commandbutton_enter_onclick()
not_yet = False
end sub


RE: help me please =/ by LiMãØ on 08-14-2004 at 04:21 AM

well... I got a problem here... when I'll compile it... it says the "not_yet" variable is not defined.. :(


RE: help me please =/ by Mnjul on 08-14-2004 at 04:38 AM

Choli said it is a global variable, so you must declare it somewhere in  a .bas module file like

Public not_yet As Boolean


RE: help me please =/ by Choli on 08-16-2004 at 07:08 PM

quote:
Originally posted by Mnjul
I believe "Form.Show vbModal" returns only after the form is hided or unloaded, Choli
yeah, stupid me... I was thinking in making the form non modal and I typed vbmodal :P
quote:
Originally posted by Mnjul
DoEvents ' You don't want to hang Messenger here, don't you
sorry again, I forgot it :P Anyway, I had problems with DoEvents if it's inside a timer proc. I don't think it gives problems inside the parsecommand of plus, however be careful;)

a bit offtopic: btw, into what api call does VB translate (compile) DoEvents? In other words, is there any other way of yield the processor?
RE: help me please =/ by LiMãØ on 08-17-2004 at 02:59 AM

:( err..... a made everything that you guys said.... but my command now don't work... only the command that opens the dialog :( the others works fine... :( did I made something wrong??? add me to your contact list? limaodf@msn.com

tnks for the help...


RE: help me please =/ by Mnjul on 08-19-2004 at 03:32 AM

Do you have any runtime errors?


Choli:
This is what I do in my C++ programs...not very sure if VB uses this ;)

code:

//(Under MFC)
//Ultimate DoEvents
void __stdcall DoEvents(){
    MSG dispatch;
    while (::PeekMessage( &dispatch, NULL, 0, 0, PM_NOREMOVE))
    {
        if (!AfxGetThread()->PumpMessage());
    }
}



RE: help me please =/ by LiMãØ on 08-20-2004 at 10:05 PM

I don't know if VB uses this code that you wrote too.... =/ I´m new on plugins development and I'd like to have some help =/