Arduino and VB script

VB script is a fairly powerfull scripting language that is built into all  (win 2000 and up) versions of  the Windows OS. VB script is sligthly dated, and relies heavily on COM objects, and i t looks like MS is planning on letting the .NET based Powershell take over. But VB script is free and present on almost all Windows PC’s so i thought it would be a nice way to extend the capabilities of Gobetwino, without the user having to install anything.

While i was testing some ways to use VB script together with Gobetwino, i realsed that vbscript can do serial communication, and even in more than one way.

VB script allows you to open the COM port as a file. This approach i found out was already described by Florinc in thisthread on the Arduino forum. This is a simple and very easy way to send some data to Arduino from VB script.

The other, more advanced approach is to use the mscom.ocx control. This control originally came with some of Microsofts development tools (VB 6.0 pro and others) it is not installed on mos modern Windows systems, but it is easy to find and download a copy on the net. The file is called Mscomm32.ocx, and it must reside in the c:\windows\system folder. It is also necessary to register it on your system. you do this by running the cmd.exe command line tool, change directory to c:\windows\system, and type regsvr32 mscomm32.ocx at the command prompt. A small dialog box informs you that the registration succeeded. Now you can use the mscomm object in VB script.

More to come soon..