sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Add automatically a file to send by e mail

    Scheduled Pinned Locked Moved Plugins
    3 Posts 2 Posters 250 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.
    • G Offline
      glro
      last edited by

      this code launches the email program on the computer

      UI.openURL("mailto:???@???")

      Is there a way to add automatically a file?

      i didn't find anything here http://code.google.com/intl/fr/apis/sketchup/docs/ourdoc/ui.html#openURL

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        You can't add 'arguments' to a UI.openURL() - it's a 'path' only tool.
        BUT you can write a cmd/bat file with the needed data and then open that [it 'executes'] and that can pass/use arguments written into it thus...

        START mailto;"someone@somewhere.com?subject=The%%20Title&cc=%%20&bcc=%%20&body=Hello%%20testing%%20123
        

        See here for more details http://www.robvanderwoude.com/email.php or http://www.paulsadowski.com/wsh/cmdmail.htm
        There are ways to escape the used special characters if you want...
        Just compile the message File.write to a temp file called say 'C:/Temp/emailer.cmd' then
        UI.openURL('file:///C:/Temp/emailer.cmd') to run it.
        You can even make it erase it self as it ends...

        TIG

        1 Reply Last reply Reply Quote 0
        • G Offline
          glro
          last edited by

          @tig said:

          You can't add 'arguments' to a UI.openURL() - it's a 'path' only tool.
          BUT you can write a cmd/bat file with the needed data and then open that [it 'executes'] and that can pass/use arguments written into it thus...

          START mailto;"someone@somewhere.com?subject=The%%20Title&cc=%%20&bcc=%%20&body=Hello%%20testing%%20123
          

          See here for more details http://www.robvanderwoude.com/email.php or http://www.paulsadowski.com/wsh/cmdmail.htm

          There are ways to escape the used special characters if you want...
          Just compile the message File.write to a temp file called say 'C:/Temp/emailer.cmd' then
          UI.openURL('file:///C:/Temp/emailer.cmd') to run it.
          You can even make it erase it self as it ends...

          i am not familiar with batch programs, but i shall try to understand the way to do it; thank you!

          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