mIRC Homepage

Dialog event

Posted By: truguce

Dialog event - 12/01/07 10:11 AM

Just wondering is there is a dialog event for enter in a text box. What im trying to get is the text in one text box(#4) to get entered in another(#3) by pressing enter.
Code:
dialog dcc_conf {
  title "DCC Conference"
  size -1 -1 375 198
  option dbu
  tab "Chat", 1, 5 11 363 177
  edit "", 3, 8 29 356 144, tab 1 read multi autovs
  edit "", 4, 9 175 355 10, tab 1 return autohs
  tab "Names", 2
}

Thanks for any help on this.
Posted By: Riamus2

Re: Dialog event - 12/01/07 01:50 PM

If you're using mIRC without a DLL, I just put a hidden DEFAULT button that when "pressed" will do what you want to happen when ENTER is pressed. Because ENTER works like pressing the selected button, this works fairly well.

Otherwise, I've had luck using KEYUP with key# 13 on DCX for handling the enter key.
Posted By: truguce

Re: Dialog event - 14/01/07 06:01 AM

Thanks for the info. Is it possible to shoe me how to set that up? I will look for the dll so I should have it.
Thank You
Posted By: Riamus2

Re: Dialog event - 14/01/07 05:52 PM

Inside your callback alias, do something like this:
Code:
if ($2 == keyup && $3 == ID_of_DCX_edit_control && $4 == 13) {
  commands to enter text into whatever control you want it entered into.
}


For help using DCX, try the DCX site's documents, or check out the included example scripts in the DCX download.
Posted By: DJ_Sol

Re: Dialog event - 16/01/07 06:37 PM

You could use the edit event.

on *:dialog:dcc_conf:edit:4:{
did -ra $dname 3 $did(4)
}
Posted By: RusselB

Re: Dialog event - 17/01/07 01:29 AM

That wouldn't work per the request, as the request stated that the information was to be sent upon the Enter/Return key being pressed.

Using the edit event, per your code, would have the information displayed in 3 being changed simultaneously with the information being changed in 4. The edit event doesn't wait for the Enter/Return key to be pressed before the rest of the event is completed, but completes all of the commands for every keystroke in the edit ID.
Posted By: Riamus2

Re: Dialog event - 17/01/07 02:22 PM

And I still suggest using a hidden button that is set as default for something like this if you don't need any other part of DCX.
© 2022 mIRC Discussion Forums