mIRC Home    About    Download    Register    News    Help

Print Thread
#197119 29/03/08 12:10 PM
Joined: Oct 2006
Posts: 11
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2006
Posts: 11
I have a edit box in a dialog and would like it to send text thats in it to the channel ... when i hit the enter key

Hi Everyone "enter-key" <- Sends This To Channel

I have a msg Button next to it that sends the text to the room ..
I have rclick send it to the room ..

on *:dialog:test1:rclick:*: {
if ( $did(47).text == $null ) { halt }
msg #channel $did(47).text
did -o test1 47 1
}
this is the message button:

if ($did == 46) {
msg #channel $did(47).text
did -o test1 47 1

------------------------------------
Any Ideas ?

Last edited by WarlockTheWeary; 29/03/08 12:27 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Include the default style with your msg button. Additionally, including OK and/or Cancel styles will close the dialog as well, automatically.

Joined: Oct 2006
Posts: 11
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2006
Posts: 11
Sorry I wasnt clear ... hope this helps smirk

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As mentioned, put the default style on the send button...

Example:
button "Send",1,5 5 20 10, default

This will make that button the default button, so that when you hit Enter, it will trigger that button automatically. Then, in your sclick event, set whatever you want done for that button's ID.

Example:
Code:
on *:dialog:yourdialog:sclick:*: {
  if ($did == 1) { msg #yourchannel $did($dname,2) }
}


That examples assumes the button is ID 1 and the editbox is ID 2. Change the numbers to the appropriate numbers (and replace "yourdialog" with the name of your dialog).


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2006
Posts: 11
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2006
Posts: 11
Works Great Thanks !


Link Copied to Clipboard