• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Ruby and VB?

Scheduled Pinned Locked Moved Plugins
7 Posts 3 Posters 946 Views
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 19 Jan 2010, 08:44

    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
    • T Offline
      TIG Moderator
      last edited by 19 Jan 2010, 09:32

      @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 19 Jan 2010, 09:51

        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
        • T Offline
          thomthom
          last edited by 19 Jan 2010, 09:57

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

          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 19 Jan 2010, 10:15

            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
            • T Offline
              thomthom
              last edited by 19 Jan 2010, 10:21

              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 19 Jan 2010, 10:23

                Nice πŸ˜„

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

                Advertisement