mIRC Homepage
Posted By: MrUser Problem with $style write *.ini file - 21/12/08 02:43 PM
Hello,
i have a problem with $style, write to *.ini file and $iif
i cant find the bug frown can someone help me please smile
Code:
menu * {
  .$style($iif($readini($scriptdirmyfile.ini, Login, Status) == ON,1,0)) Status $readini($scriptdirmyfile.ini, Login, Status) { writeini -n $scriptdirmyfile.ini Login Status $iif(writeini -n $scriptdirmyfile.ini Login Status == ON,OFF,ON) }
}

Posted By: DJ_Sol Re: Problem with $style write *.ini file - 21/12/08 02:54 PM
Originally Posted By: mIRC Help File
Menu Styles

You can place a check mark or create a disabled menu item by using the $style(N) identifier, where N = 1 for checked, N = 2 for disabled, and N = 3 for both. The $style(N) identifier must be the first word in the menu definition.



menu status {

$iif($server == $null,$style(2)) Server Info


}




Any Questions?
Posted By: MrUser Re: Problem with $style write *.ini file - 21/12/08 02:57 PM
Hello,
i know the Help, but i cant fint my bug crazy dont know waht is wrong.

Edit: the part in { } is bad i cant safe the status
Posted By: 5618 Re: Problem with $style write *.ini file - 21/12/08 03:00 PM
Quote:
$iif(writeini -n $scriptdirmyfile.ini Login Status == ON, ...)


That is not a valid if-statement. See /help $readini instead.
Posted By: MrUser Re: Problem with $style write *.ini file - 21/12/08 03:33 PM
Hello,
now i have it cool i hope it is correct wink
Code:
menu * {
.$style($iif($readini($scriptdirmyfile.ini, Login, Status) == ON,1,0)) Status $readini($scriptdirmyfile.ini, Login, Status) { writeini -n $scriptdirmyfile.ini Login Status $iif($readini($scriptdirmyfile.ini, Login, Status) == ON,OFF,ON) }
}

now i can start to build a $submenu wink
© mIRC Discussion Forums