0 Replies Latest reply on Jun 16, 2016 1:13 AM by poortip87

    How can I select a tool programmatically?

    poortip87 Level 1

      Hi All,

       

      I am using AI CC 2015.

      I have a requirement to select the Group Selection Tool when I click on a button on my HTML5 extension.

       

      So far, haven't found anything that can select a tool using scripts.

       

      Found how to do it through a C++ plugin easily though. Here all all the methods that can be used to go about it.

      #include <AITool.h>
      
      name = kToggleDirectSelectTool 
      AIAPI AIErr(* AIToolSuite::GetToolNumberFromName)(const char *name, AIToolType *toolNum) 
      AIAPI AIErr(*  GetToolHandleFromNumber )(AIToolType toolNum, AIToolHandle *tool) 
      AIAPI AIErr(*  SetSelectedTool )(AIToolHandle tool) 
      

       

       

      But I don't want to include a plugin with my extension. I was hoping it could be done through the extension itself.

       

      Can anyone help?