- Why not take advantage of the different icons established for each thumbconf when the script is implemented by a keyboard shortcut. Your code is there to change the name icon and state but you only use it if implanted by a CTB. What I suggest is determine the CTB index (e.g., $ctbindex) that the user assigned to the CTB based on the ctbname or just have the user provide it in the script, and then use that ctbindex in the code lines below. This way the icon on the CTB changes nicely when you use a customized keyboard shortcut. Though a check should be done if the user doesn't have a CTB assigned and only uses a CKS.
Code: Select all
// if ($inCTB) {
CtbName($name,$ctbindex);
CtbState(GetToken($newState, 3, '|'),$ctbindex);
CtbIcon(GetToken($newState, 4, '|',,2),$ctbindex);
// }
Code: Select all
$view = Get('View');
if("|4|5|6|" UnLikeI "*|$view|*") {status "Present view is not a thumbnail viewing mode."; end(1);}