mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog Editbox #174564 09/04/07 08:17 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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


-Kurdish_Assass1n
Re: Dialog Editbox [Re: Kurdish_Assass1n] #174566 09/04/07 08:20 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
Code:
on *:dialog:name:sclick:id:{ did -r $dname $did }

Re: Dialog Editbox [Re: hixxy] #174567 09/04/07 08:29 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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 }
  }



}


-Kurdish_Assass1n
Re: Dialog Editbox [Re: Kurdish_Assass1n] #174670 10/04/07 07:50 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
is it possible to do this without a dll, or no?


-Kurdish_Assass1n
Re: Dialog Editbox [Re: Kurdish_Assass1n] #174678 10/04/07 10:51 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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
  }
}

Re: Dialog Editbox [Re: RusselB] #174679 11/04/07 01:48 AM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
ok RusselB, Thanks man, haven't done this in a very long time, lol, thanks again.


-Kurdish_Assass1n
Re: Dialog Editbox [Re: Kurdish_Assass1n] #174680 11/04/07 02:12 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.