Thanks for your replies, I'm trying to store the user's current select tool and then bring it back later after my script has finished so they don't lose their current tool mode. I was hoping a could do this with a query and then set that mode at the end of the script, I got it working, but this feels like more code than should be required to do something like this. Is there an easier solution?
//Store current tool
string $currentToolActive = `currentCtx`;
//Do some stuff here
//Bring back user tool
if(`gmatch $currentToolActive "*selectSuperContext*"`)
{
SelectTool;
}
if(`gmatch $currentToolActive "*lassoSelectContext*"`)
{
LassoTool;
}
if(`gmatch $currentToolActive "*artSelectContext*"`)
{
artSelectToolScript 4;
}
if(`gmatch $currentToolActive "*moveSuperContext*"`)
{
MoveTool;
}
if(`gmatch $currentToolActive "*RotateSuperContext*"`)
{
RotateTool;
}
if(`gmatch $currentToolActive "*scaleSuperContext*"`)
{
ScaleTool;
}