I too use a simple legacy VBScript that works under 64-bit Win-7 but crashes under 64-bit Win-8. If anyone can suggest what is different in Win-8, I would be grateful.
The script "create.vbs"
ASCOM FITS driver uses a FITS.dll "driver" to capture images under the
astronomical ASCOM environment
ASCOM - Standards for Astronomy
This driver is registered using "
regsvr32 FITS.dll" which creates Windows Registry entries for the ASCOM camera "CCDSimulator.Camera".
The script first creates a camera object:
Set camera = CreateObject("CCDSimulator.Camera")
then an image object:
Set image = CreateObject("FITS.Image")
Under Win-7 it then retrieves the image array from the camera and produces a FITS image with:
image.ImageArrayVariant = camera.ImageArrayVariant
But it CRASHES under Win-8 at that line.
If that line is commented out, a file is produced (without the image data) but including
image.ExposureInterval = exposuretime
The image file is written out with:
image.WriteToFile filename
Usage for 64-bit Windows using an Administrator shell:
C:\windows\syswow64\cscript.exe create.vbs testimage.fit
Short listing for
create.vbs script:
---------------------------------------
Sub Main
filename = WScript.Arguments.Item(0)
exposuretime = 2
' seconds
' Create the CCD simulator object
Set camera = CreateObject("CCDSimulator.Camera")
camera.Connected = True
' Expose with the simulator
WScript.Echo "exposing " & exposuretime & " seconds..."
exposurestarttime = now
camera.StartExposure exposuretime, True
While Not camera.ImageReady
WScript.Sleep 100
Wend
' Create the ASCOM FITS driver object
Set image = CreateObject("FITS.Image")
' Fetch image array (raw pixel data) from the camera and feed it directly to our image object
image.ImageArrayVariant = camera.ImageArrayVariant
' Set some properties for our new FITS file
image.ExposureInterval = exposuretime
' Finally create the new FITS file
image.WriteToFile filename
End Sub
---------------------------------------