⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testit.vbs

📁 天文望远镜电动调焦距驱动程序
💻 VBS
字号:
' Focuser Test program by Mike Gore, April 2003
'
' To run type testit.vbs at te command prompt
' Note: You must register the dualfocusdriver first
' 		- Change into the Relase Directory and run the command
' 		regsrvr32 dualfocusdriver.dll
' 		- You will have to rerun the command if you change its location
'
	Dim Focus
	Dim Util
	
	Dim temp
	Dim pos
	Dim StepSize

	Set Util = CreateObject("DriverHelper.Util")
	Set Focus = wscript.CreateObject("DualFocus.Focuser")
	'Set Focus = wscript.CreateObject("JMISmartFocus.Focuser")

	Focus.SetupDialog

	Focus.Link = True
	if Not Focus.Link Then
		wscript.echo "Failed to start Focuser"
		Quit
	End If
	
	Wscript.Echo "Absolute: " & Focus.Absolute
	Wscript.Echo "Ismoving: " & Focus.IsMoving
	Wscript.Echo "MaxStep: " & Focus.MaxStep
	Wscript.Echo "Position: " & Focus.Position
	Wscript.Echo "StepSize: " & Focus.StepSize
	Wscript.Echo "Temperature: " & Focus.Temperature

' Uncommenting the next line will cause an error
' since compensation has not been compiled in - yet
	'Focus.TempComp = TRUE
	Wscript.Echo "TempCompAvailable: " & Focus.TempCompAvailable

	Focus.Move(100)
	Wscript.Echo "Ismoving: " & Focus.IsMoving & "Keep clinking OK"

'keep clicking "ok" and you can watch it move in real time!
	Do While Focus.IsMoving
		Wscript.Echo "Position: " & Focus.Position
	Loop
	
	Focus.Move(200)
	Do While Focus.IsMoving
	Loop

	Focus.Move(100)
	Focus.Halt()		' this is so fast nothing will happen!
	Wscript.Echo "IsMoving: " & Focus.IsMoving
	Wscript.Echo "Position: " & Focus.Position
	Wscript.Echo "Thats all!"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -