Hey there, as I've stated before, I'm relatively new to scripting. I always only worked with what I knew and never went out of comfort zone which resulted in very basic scripts. Every now and then I attempt to improve my knowledge of .ini files which results in a bit of a break through every now & then.
So, I'm attempting to have a dialog with multiple check boxes for prots. I don't want all the same prots active for different channels I'm on, so I want to write to an ini file what channel has what check boxes ticked. I've sort of got the basics down but the info is too vague (I think) to call on when the init fires. This is my demo model...
dialog check.test {
title "New Project"
size -1 -1 90 84
option dbu
check "Hop", 1, 16 16 26 10
check "Flood", 2, 16 28 26 10
check "CTCP", 3, 16 40 26 10
button "Close", 9, 44 67 37 12, ok cancel
button "Apply", 10, 6 67 37 12
}
alias a {
dialog -m check.test check.test
}
On *:Dialog:check.test:sclick:10:{
writeini -n testers.ini Prots $+ $active enable $did(1).state $did(2).state $did(3).state
}
On *:Dialog:check.test:init:*:{
did $iif($readini(testers.ini,n,Prots $+ $active,enable) = 1,-c,-u) $dname 1-3
}
I need a better way of sending the ticked info to the .ini file and a way of calling the info on each channel I'm on.
ini file loks like this.
[Prots#scripters] enable=1 1 1 [Prots#err0rtest] enable=0 1 0
but of course, this doesn't say which 1 or 0 is which checkbox etc, and my $iif on the init wouldn't know how to handle the data properly.
If this question makes any sense to you, do you think you could offer some advice? I'm not asking for anyone to write the code for me, perhaps just explain some syntax that would help me find my way.
Many thanks in advance ![]()