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

    Mouse event or...

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 176 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.
    • B Offline
      bizello
      last edited by

      Hi,
      Yes, me again...😄 😄 😄
      I,ve seen plugins that after start wait for a lot of mouse clicks to insert a point (like clinetool) or a component (like component spray). How create this type of mouse event?
      I have a script that insert a hole on the wall from its base line. But every time I have to select the base line and activate the script. I want run the script and select the base line, the hole is inserted (already do this) and the system ask for next base line, and so on. This is a mouse event, right? How to do this? Is this happen in cclinetool, correct? And for these cases how is the better way to finalize the command? Right click, escape key or another action?
      A lot of questions you are saying, I know, but here is the best place to kill my doubts.
      Thanks.
      Sérgio
      P.S. I've searched on the web and I've opened some scripts to learn how do this, but also I'm trying to leave the programmer's begginer level, and need some explanations as the functions works.

      Sérgio A.Bizello

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        You need to implement the Tool class: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/tool.html

        In your plugins folder there is an Example folder - that has examples of how to build a Tool.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Moved the thread to the Developer's forum. We have reorganized so that the Plugin section is only a list of plugins you can download and use. 🤓

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          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