I'm just learning how to use Visual Basic (VB) for use in Housebot scripts. At first, I thought the scripting language was rudimentary but after I started learning VB, there are a lot of real neat things you can do with HB scripts. I learned the language by using the Microsoft Excel's VB langauge reference - it's available as part of Excel's help resource. I found it very handy because it lists all the statements, functions, and keywords that can be used in VB. More importantly, code examples are provided.
However, I do have a question about the VB capabilities in HB. Is it a full VB implementation? Although the Excel version has some spreadsheet specific functions meant for manipulating its worksheets, I stayed away from those. However, I had trouble with some of the VB capabilites that it was supposed to have. For example, I tried to declare an array of strings by using the statement:
Code: Select all
dim arrayOfStrings as array of string
I'm just typing this from memory so I may not have the syntax correct, but I did take a code example and HB refused to allow anything after the variable name, saying it was expecting an end of line. I was not able to explictly declare variables as integers, either.
The other thing I had trouble with was a For...Loop. On the face of it, it looks really simple. Howver, HB refused to let me implement a for...loop of any kind and I ended up using a Do...While loop construct instead.
So that made me wonder if I can actually use all the VB capabilities or are only a subset available for use? If so, where can I find more information on its actual capabilities?
Thanks.