mIRC Home    About    Download    Register    News    Help

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

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Code:
on *:dialog:name:sclick:id:{ did -r $dname $did }

hixxy #174567 09/04/07 08:29 PM
Joined: Apr 2006
Posts: 399
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
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 }
  }



}

Joined: Apr 2006
Posts: 399
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
is it possible to do this without a dll, or no?

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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
  }
}

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

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.


Link Copied to Clipboard