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

    Ruby and VB?

    Scheduled Pinned Locked Moved Plugins
    7 Posts 3 Posters 946 Views 3 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.
    • P Offline
      Pauline01
      last edited by

      Hello,

      It's possible to lunch a VBscript with ruby?? or with a dll or API to use VB in a plugin ruby??

      thanks.

      Pauline

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

        @pauline01 said:

        Hello,
        It's possible to lunch a VBscript with ruby?? or with a dll or API to use VB in a plugin ruby??
        thanks.
        Pauline

        You can 'open' any file using UI.openURL("pathtofile").
        Depending on the associations set with the file it opens or runs - so a file called...
        xxx.vbs will run the VB script
        xxx.txt will open in Notepad
        xxx.doc will open in Word
        xxx.skp will open in Sketchup
        xxx.dwg will open in CAD
        xxx.htm will open in your default web-browser
        xxx.bat or xxx.cmd will run a dos-batch file
        xxx.exe will run the application... etc etc

        Don't know what you are thinking to do, but much that can be done in VB can be done in the built-in Ruby ?

        You can only access the SUp API directly via C+... unfortunately VB isn't supported... 🤓

        TIG

        1 Reply Last reply Reply Quote 0
        • P Offline
          Pauline01
          last edited by

          oh, if VBS can run it's good,

          but... if i want take a string of my plugin ruby and to pass this string in a VBS, i must open a webdialog, and in my php to use the VBscript with IE? or this is an other solution?

          I want to run a electrical motor for a blind for example when i click on an object draw whith sketchup 😄🙂 and the COM it's a windows dll, i can use VB, c, c++, c#...but no ruby 😛
          So i must with my plugin ruby run a VBS(but i need some information as the motor adress), or to can use c / c++...

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

            You can call the Windows API from Ruby, so are you sure you can call any arbitrary dlls?

            Link Preview Image
            rubytips.org - rubytips Resources and Information.

            rubytips.org is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, rubytips.org has it all. We hope you find what you are searching for!

            favicon

            (www.rubytips.org)

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

            1 Reply Last reply Reply Quote 0
            • P Offline
              Pauline01
              last edited by

              Hum...the context is not easy.

              I explain better^^ the API to up or down for example a roller shutter, is a service, like a Windows service.

              I have a test ok with some language: c, c++, VB, VBS, C#.

              And with my plugin ruby i want create a link with a language, to can use the service.

              Example in VBS:

              
              
              'the service always run, just need to create a new COM
              
              Set Solaris = CreateObject ("VsxComServer.SolarisApp")
              set VsxVBus = Solaris.VSXVBus
              
              'Up the blind
              
               VSXVBus.VSXStop 67, zg, zsg, rg, rsg, ft	
               VSXVBus.VSXWait 100
               VSXVBus.VSXUp 67, zg, zsg, 0, rg, rsg, ft
              
              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Might this help: ?
                http://rubyonwindows.blogspot.com/2007/02/from-vb-to-ruby-creating-objects-via.html

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

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pauline01
                  last edited by

                  Nice 😄

                  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