I've been messing with the new scripting function CTBstate and it appears that you can easily assign a different scripts (e.g., XYscript menu or operation) for each
state of the CTB for both a
left click and a
right click of the CTB. You can easily cycle back and forth to the different menus by re-clicking with the left or right mouse button. Very nice Don! See the simple example below. For the normal left click CTB assignment:
Code: Select all
if (ctbstate() == 1) {
ctbstate(0);
ctbicon(":fore");
load("<xyscripts>\Item Store.xys");
} else {
ctbstate(1);
ctbicon(":back");
load("<xyscripts>\PhotoCrop_both_axis.xys")
}
For the right click CTB assignment:
Code: Select all
if (ctbstate() == 1) {
ctbstate(0);
ctbicon(":browsenetwork");
load("<xyscripts>\LayoutManager\LMMenu.xys")";
} else {
ctbstate(1);
ctbicon(":home");
load("<xyscripts>\SessionManager.xys");
}
Of course you'll have to ignore the script names obviously, and insert your own to experiment. You can even double click with the right or left mouse to get the different "state" and the resultant menu. This kind of thing probably works best for different menu scripts as oppose to taking direct actions. The only issue is coming up with meaningful icons (and tooltips) that properly describe the actions of the menus or operation. Maybe by changing the icon with "CTBicon" again after the operation or menu dispplay. Any ideas?
Thanks,
Ken