mIRC Home    About    Download    Register    News    Help

Print Thread
#105402 15/12/04 01:21 PM
Joined: Dec 2004
Posts: 12
D
Depodra Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Dec 2004
Posts: 12
Hi, i've been scripting in mIRC for a while and i would like to know, in a dialog, how to insert text into a editbox when a button is sclick'ed.

Currently i have...
Code:
 ;General Dialogs

dialog stats {
  title "General Statistics"
  size -1 -1 150 100
  option dbu

  button    "Uptime", 1, 4 4 142 13, style  center,
  button    "Uptime2", 2, 4 17 142 13, style  center,
  edit      "", 999, 4 82 142 10,
  text      "- General Stats By: Depodra                                        v2.0", 998, 3 92 149 10, disabled
}
on *:Dialog:*:*:{
  if ($devent == sclick) && ($did == 1) {
    /did -a stats 999 1 $duration(%uptime) afsd
  }
}

menu channel {
  General Stats:/dialog -morv stats stats
}
  


i'm very sure that the /did -a stats 99 1 $duration(%uptime) afsd is very incorrect. This is where i would like button id 1 to insert the variable %uptime into the editbox. If this can be done, i'd verymuch appreciate if som1 could tell me how. confused

Thanks in advance...

#105403 15/12/04 03:00 PM
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
If the editbox is empty --> did -a stats 999 $duration(%uptime)

If the editbox is not empty you can overwrite the data with --> did -o stats 999 1 $duration(%uptime)

You do not need to use the "/" in scripts, they are only for commands entered from the editbox in a channel, status, etc.

#105404 16/12/04 04:16 AM
Joined: Dec 2004
Posts: 12
D
Depodra Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Dec 2004
Posts: 12
tyvm. but you didn't notice i left out the dialog name in
on *:dialog etc.
but stil, that helped smile


Link Copied to Clipboard