mIRC Home    About    Download    Register    News    Help

Print Thread
#42869 19/08/03 04:42 AM
Joined: Aug 2003
Posts: 21
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Aug 2003
Posts: 21
trying to get this to work any ideas would be great

Code:
on *:dialog:Channick:sclick:24:{
  if ($server != $null) {
    if (%autochan1) { join %autochan1 } 
    else on *:dialog:error1:edit:2:/did -ra $dname 2 $read(errors.txt, 1)

  }
  else {
    on *:dialog:error1:init:0:/did -ra $dname 2  $read(errors.txt, 1)
  }
} 

 


thanks for all who helps put

#42870 19/08/03 04:55 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
You cannot have an event inside another event.

Code:
on *:dialog:Channick:sclick:24:{  
  if ($server) {
    if (%autochan1)  join %autochan1
    else {
       [color:red]on *:dialog:error1:edit:2:/did -ra $dname 2 $read(errors.txt, 1)[/color]
       [color:green]all you can do here is start a second dialog or something.
       then use this event as a standalone event.[/color]
    }  
  else {
    [color:red]on *:dialog:error1:init:0:/did -ra $dname 2  $read(errors.txt, 1)  [/color]
    [color:green]same applies here.[/color]
  }
}    


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#42871 19/08/03 05:08 AM
Joined: Aug 2003
Posts: 21
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Aug 2003
Posts: 21
how could I do it in there with out that

#42872 19/08/03 12:07 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Depends - what is it that you want to do?


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#42873 19/08/03 05:40 PM
Joined: Aug 2003
Posts: 21
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Aug 2003
Posts: 21
what i want it to do is when somebody clicks on a area of a dialog and there is an error i want it to show up in a text box window saying the error and I want the error dialog box open all the time so all my dialogs will all show errors in the error dialog box

#42874 19/08/03 06:53 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
A dialog doesn't have area's. A dialog has items, which can be listboxes, buttons, edit boxes, etc. The on DIALOG event responds when you click inside such an item. When you click on the GUI itself, not in an item, nothing gets triggered, and so there are no errors either. When you click on a button to do something but some variable isn't set, then you can use something like:

Code:
on *:DIALOG:tablename:id-of-button: {
  if (!%varname) echo -a var has no value !!
}


and of course you can dump that echo into another dialog.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#42875 19/08/03 10:15 PM
Joined: Aug 2003
Posts: 21
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Aug 2003
Posts: 21
How would I go about dumping that echo in to a dialog I have read through the help files that come with mirc but I could not find it

#42876 20/08/03 12:07 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Use /did -a [color:green]dialog id var has no value !![/color].


Link Copied to Clipboard