mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2005
Posts: 53
A
aDevil Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Code:
alias @notice /dialog -m @notice @notice
dialog @notice {
  title "Notice"
  size -1 -1 130 410
  list 1, 10 10 100 40
  list 2, 10 45 100 65
  if $exists(nsaved.dat) {
    list 3, 10 95 100 50
    list 4, 10 130 100 40
  }
  button "Ok", 5, 20 385 40 20, ok
}
 


Why not working this if? frown

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
To the best of my knowledge, I'm pretty sure you cannot have if statements inside dialogs. I'll show you how you can do the exact same thing with the INIT dialog event.

Code:
alias @notice /dialog -m @notice @notice
dialog @notice {
  title "Notice"
  size -1 -1 130 410
  list 1, 10 10 100 40
  list 2, 10 45 100 65
  list 3, 10 95 100 50[color:red], hide[/color]
  list 4, 10 130 100 40[color:red], hide[/color]
  button "Ok", 5, 20 385 40 20, ok
}

On *:Dialog:@notice:init:*: {
  if ($isfile(nsaved.dat)) {
    did -v @notice 3,4
  }
}


Ok, it does exactly what you wanted only, the two list boxes are hidden. When the Dialog is opened we check to see if the file exists, if it does we use the /did -v command to make the ID visible.

All the best,

-Andy


Link Copied to Clipboard