本帖最后由 雨林GG 于 2010-8-10 07:49 编辑
在论坛找的代码,想添加到自己的局域网聊天中,但不管是用1.0还是7.0哪个版本的都出现了无法保存的问题,请各位帮忙看看,哪个地方出问题了?#include <ScreenCapture.au3>
#include <GUIConstantsEx.au3>
#include <Clipboard.au3>
#include <GDIPlus.au3>
$hGUI = GUICreate("截屏工具", 400, 180)
$Button1 = GUICtrlCreateButton("鼠标截图", 150, 95, 100, 30)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
Camera()
EndSwitch
WEnd
GUIDelete()
Func Camera()
WinSetState($hGUI, "", @SW_HIDE)
;RunWait("rundll32.exe CameraDll.dll,CameraSubArea",'',@SW_HIDE)
DllCall(@ScriptDir & '\CameraDll.dll', 'int', 'CameraSubArea', 'hwnd', 0)
$hBitmap = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage(@ScriptDir & '\Capture.jpg', $hBitmap)
WinSetState($hGUI, "", @SW_SHOW)
EndFunc ;==>Camera
|