我创建了一个函数,它应该等待特定的实际时间(每个准确的小时),然后将屏幕截图保存在文件夹中。它在 Windows XP 和更新版本中运行良好,但我的工作操作系统是“Win NT SP6”。
我的功能:
Func Print()
$count = 1
$delayloop = 1
DirCreate("C:\Print")
While $delayloop = 1
$PrintMin = 00 ; The minute of PrintScreen
For $count = 1 To 24
$loop = 1
While $loop = 1
sleep(1000)
If $PrintMin = @MIN Then
Sleep(1000)
_ScreenCapture_Capture("C:\Print\Picture " & @HOUR & ".jpg")
$loop = 0
EndIf
WEnd
Sleep(60000)
Next
sleep(500)
WEnd
EndFunc
我知道该_ScreenCapture_Capture
功能需要 Win NT 中没有的 GDI+。
我找到gdiplus.dll
并将其复制到c:\winnt\system32
Win NT 中的文件夹(即我的程序执行文件夹),但是当我的脚本到达该行时_ScreenCapture_Capture
它突然终止。
请帮我解决这个问题。