Give the capabilities they’re describing, you’d think they’d have some sample code available that would give you a starting point. Might not be VB, but given Visual Studio Community is free, if you can hack VB, you can probably hack C# code too.
Regarding the scripting in general, the one big problem I see with instantiating ASCOM drivers from a script as done in the example is that for something like my RF switch driver, where the actual state is unknown and can only be inferred from the last state of the driver setting, the constant re-instantiation of the driver for each script is undesirable. More importantly, for the Arduino controlled relay that happens to control ALL my equipment, opening the COM port resets the Arduino, so every time the driver would be brought up to open the port, BOOM, all the equipment shuts off! That won’t work!
The problem also goes beyond just switches as there are other things that are missing. I got to looking at the observatory interface in SGP and it looks like that’s ONLY for domes. So the only way to open/close my roll-off is through a script. Likewise, before ANY of the other equipment drivers that it actually does support can be connected, the startup needs to turn it on. So a camera can’t be connected to cool down until a dedicated “run once” script were to execute. Of course given I haven’t found a software hibernation solution for NexRemote, the telescope still has to be started up manually after the system power starts, and the power can’t be turned off until it’s hibernated manually.
At this point it looks like I’m headed back towards developing a single application console to aggregate all of the functions of the various individual programs I use now. That was my plan prior to starting to use SGP. The only question is whether or not to go through the added trouble of using the ASCOM layer in between that and my hardware. It adds more work, but would make some of the stuff I’m developing accessible to others. By adding the console, it would make it straightforward to write scripts that would send commands directly to the console without all the added initialization steps for each ASCOM driver.