mIRC Homepage

Dialog Editbox

Posted By: Kurdish_Assass1n

Dialog Editbox - 09/04/07 08:17 PM

Hi, I'm finally back on IRC, I have been gone for like 2 months and honestly have forgotten a little bit of dialogs. Is there a way to clear an editbox when someone clicks on it? is it on sclick (edit) or....? Thanks
Posted By: hixxy

Re: Dialog Editbox - 09/04/07 08:20 PM

Code:
on *:dialog:name:sclick:id:{ did -r $dname $did }
Posted By: Kurdish_Assass1n

Re: Dialog Editbox - 09/04/07 08:29 PM

I did something like that, but, it's not working, this is for a username/password entry. it's just like:
Quote:

Login
Enter Username: Username
Enter Password: Password
Ok Cancel Help

When I click on the editbox that says username, I want it to delete.


Here's what I have:
Code:
dialog tmuscript {
  title "TMU Mods Admin Script v1.0"
  size -1 -1 289 125
  option pixels
  text "TMU Mods Username", 5, 5 12 100 17
  button "Cancel", 7, 87 90 65 25, cancel
  button "Help", 8, 214 90 65 25
  button "Log In", 6, 12 90 65 25, ok, default
  text "TMU Mods Password", 9, 5 40 100 17
  edit "Username", 10, 110 11 100 20
  edit "Password", 11, 110 38 100 20, pass
  menu "File", 1
  item "Close", 3, 1
  menu "Help", 2
  item "Intructions", 4, 2
}

on *:DIALOG:tmuscript:*:*: {



  if ($devent == init) {
    echo -ae *Opened: tmuscript
    set %start 1
  }

  if ($devent == sclick) {
    if (%start == 1) { did -r tmuscript 10,11 | unset %start }
  }



}
Posted By: Kurdish_Assass1n

Re: Dialog Editbox - 10/04/07 07:50 PM

is it possible to do this without a dll, or no?
Posted By: RusselB

Re: Dialog Editbox - 10/04/07 10:51 PM

Yes, it's possible. The edit box doesn't recognize the sclick (it appears), so it took some trial and error to find just what would work. Use this instead of your current sclick
Code:
on *:dialog:tmuscript:*:10,11:{
  if $devent == mouse && !$did($did).edited {
    did -r $dname $did
  }
}
Posted By: Kurdish_Assass1n

Re: Dialog Editbox - 11/04/07 01:48 AM

ok RusselB, Thanks man, haven't done this in a very long time, lol, thanks again.
Posted By: RusselB

Re: Dialog Editbox - 11/04/07 02:12 AM

np...I was basically trying to figure out why hixxy's code didn't work, as, to my knowledge at that time, it should've. Who would've guessed that edit boxes don't recognize a sclick (or a dclick, I would imagine)...maybe I should post this as a bug.
© 2021 mIRC Discussion Forums