mIRC Home    About    Download    Register    News    Help

Print Thread
#114537 15/03/05 03:06 AM
Joined: Oct 2004
Posts: 31
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2004
Posts: 31
I have this code, and I'll use the example to base the rest of my script off of

Code:
dialog game { 
  title "Game" 
  size -1 -1 300 100 
  button "OK",1, 1 75 120 25, OK 
  button "Message me",2, 1 1 100 25, ?????
}

The button with text "Message me", when pressed will do a:
/msg bearruler Hello, are you there?

Any help will be appreciated
Ive read through the help, and I dont think I was reading the right thing
I found all about how to set it up, but nothing on what makes the button work


Bear

#114538 15/03/05 05:13 AM
Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
If I understand you correctly I think this is what you are in search of.

Code:
 
dialog game {
  title "Game"
  size -1 -1 300 100
  option pixels
  button "OK", 1, 1 75 120 25, ok
  button "Message me", 2, 1 1 100 25
}
on *:dialog:game:sclick:2:{ msg $me Hello, are you there? }

Last edited by Darkmnm; 15/03/05 05:15 AM.
#114539 15/03/05 05:17 PM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66

#114540 16/03/05 06:38 AM
Joined: Mar 2005
Posts: 4
V
Self-satisified door
Offline
Self-satisified door
V
Joined: Mar 2005
Posts: 4
All dialog events are in the following format:

Code:
on *:dialog:DNAME:DEVENT:DID:{ ...code here... }


Where DNAME, DEVENT, and DID are the dialog name, event, and control ID, respectively. The mIRC helpfile gives a list of all the dialog events that are possible; but in your case you'd want to use this:

Code:
on *:dialog:game:sclick:2:{ msg $me Hello, are you there? }


This means "On a dialog event, when the user single-clicks (sclick) on the Message Me button (2) in the dialog (game) then send myself a message.


Link Copied to Clipboard