Ruby and VB?
-
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
-
@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.
PaulineYou 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 etcDon'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...
-
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++... -
You can call the Windows API from Ruby, so are you sure you can call any arbitrary dlls?
http://www.rubytips.org/2008/05/13/accessing-windows-api-from-ruby-using-win32api-library/
-
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
-
-
Nice
Advertisement