sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Mimic 'select' in custom tool

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 129 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kwalkerman
      last edited by

      Hi,

      I am writing a script where I want the user to be able to select some entities, have code do something with those entities, then ask the user to select some more entities, have the user do something with those entities, and so-on.

      The best way to do this is by using a tool - have the user use the tool to select items, press a command to execute the ruby script, the tool will re-set itself and the user can select more items. However, I'm not sure how to have the user select within a custom tool.

      Thanks,

      --
      Karen

      1 Reply Last reply Reply Quote 0
      • K Offline
        kwalkerman
        last edited by

        Duh, brain fart - use onMButtonDown to detect user's selection of objects...

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          An easier way is to make menu macros for the context menus (the right-click popup and the Edit menu's selection submenu.)

          FYI: I posted a boilerplate sample

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement