Just for jollies I set it up for a script I'll be sharing later (but not in that version). In this particular case, it doesn't make any sense because I was simply using the perm for a "1" or "0" status check on whether the Instant Color Filter was applied in a script. So I was using the same CTB or UDC or put the filter in place and also remove it if it was on. It made little sense because the filter can be toggle on and off by the toolbar button and not affect the saved perm variable. I checked out the thought process anyway and it did work fine.
Code: Select all
//*** Check perm variable $p_TabColors is set. If set, toggle ON(1) or OFF(0)
$TabColorsStatus = isset($p_TabColors)?$p_TabColors:"";
if !($TabColorsStatus) {
writePV "<xydata>\TempPV.dat";
global $p_TabColors;
$p_TabColors = "1";
releaseglobals 2;
perm $p_TabColors;
writePV "<xydata>\TabColorScriptPerms.dat";
readPV "<xydata>\TempPV.dat";
}
else {
readPV "<xydata>\TabColorScriptPerms.dat";
perm $p_TabColors;
$p_TabColors = ($p_TabColors == "1")?"0":"1";
}
// toggle Instant Color Filters "OFF" if "ON";
if($p_TabColors) {#1077; end 1;}
else {continue script...}
*/
Code: Select all
/* ### INI Settings - Do not tamper with or remove ###
[INI]
CTBindex=42
*/
Code: Select all
setkey "$ctbindex", "CTBindex", "INI", self("file");
$ctbindex = getkey("CTBindex", "INI", self("file"));