Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Can we add Windows Scripting Host to FS

For general discussion related FlowStone

Can we add Windows Scripting Host to FS

Postby VPDannyMan » Tue Jan 08, 2013 6:53 am

Can we add WSH to FS3?
I have prepared a little script that shows its relatively simple to add scripting capabilities. It runs a script from inside a script, but it could just as easily be an executable or a VST dll its running from. I realize its a little more complex to do in C++, but not that much. Thousands of programs have this available with great success.

I figure that since you are already in the scripting area fixing the Ruby implimentation, (Re: this thread http://www.dsprobotics.com/support/viewtopic.php?f=2&t=941&start=40 I'd ask you to add this while you're at it.

This would almost completely open up windows to us, we'd have access to ALL the COM objects, and I believe .NET as well? Although I'm not 100% sure on that. So the idea is that anything that can't be done in Ruby, could be done with J-Script and we could create our own com objects and call them from our scripts.

SET ScriptHost = CreateObject("MSScriptControl.ScriptControl")

Just copy this whole script to a Text file and give it a .VBS extension. Then double click it.
Code: Select all
Dim ScriptHost 'Just some variable declarations
Dim CodeLine
Dim Prmpt
SET ScriptHost = CreateObject("MSScriptControl.ScriptControl")
Prmpt = "I am running in the second instance of the Windows Scripting Host. The first instance "
Prmpt = Prmpt + "was used to run the script that would create the second instance! (Me) "
Prmpt = Prmpt + "FYI: The first instance would represent Flowstone, the second instance "
Prmpt = Prmpt + "would represent a user script"
CodeLine = "MSGBOX " & Chr(34) & Prmpt & Chr(34) & ",32," & chr(34) & "See how easy This is" & chr(34)
ScriptHost.Language = "VBSCRIPT"
ScriptHost.ExecuteStatement CodeLine


I want to be clear though, I'm not asking for this instead of Ruby, its in addition. There is obviously some problems and challenges with fully implimenting Ruby that goes beyond just the static linking. Even if that gets to working (which I strongly believe it will) it still does not answer the question of OLE and other things. So, in that case, the WSH modual could step in and be used to handle all things Windows, even including DirectX...

Anyways, is there any reason we can't have this?

Thank you
VPDannyMan
 
Posts: 118
Joined: Mon Jan 04, 2010 4:50 am

Re: Can we add Windows Scripting Host to FS

Postby support » Wed Jan 09, 2013 2:12 pm

For access to Windows ideally we'd like to get Win32OLE working via ruby. This is something that is on our list of things to look at.

As with most things there's no concrete reason why we can't do them. Usually it comes down to time and effort and the fact that we have so many other things we want to do.
User avatar
support
 
Posts: 151
Joined: Fri Sep 07, 2012 2:10 pm

Re: Can we add Windows Scripting Host to FS

Postby VPDannyMan » Thu Jan 10, 2013 2:26 am

I was sort of just thinking in terms of what ifs..
-If you do get Ruby statically linked, but cannot get the WIN32OLE settled, then this will work and I believe it would be quick to impliment....

Anyways, thanks for the reply..
VPDannyMan
 
Posts: 118
Joined: Mon Jan 04, 2010 4:50 am


Return to General

Who is online

Users browsing this forum: No registered users and 91 guests