mIRC Home    About    Download    Register    News    Help

Print Thread
#168688 12/01/07 10:11 AM
T
truguce
truguce
T
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.

#168696 12/01/07 01:50 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.

Riamus2 #168770 14/01/07 06:01 AM
T
truguce
truguce
T
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

#168792 14/01/07 05:52 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.

#168909 16/01/07 06:37 PM
Joined: Jan 2007
Posts: 1,155
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,155
You could use the edit event.

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

DJ_Sol #168941 17/01/07 01:29 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.

#168964 17/01/07 02:22 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.


Link Copied to Clipboard