Danh mục

Zoom, Phóng lớn khu vực cần thiết với AutoIT

Số trang: 3      Loại file: pdf      Dung lượng: 92.26 KB      Lượt xem: 8      Lượt tải: 0    
10.10.2023

Phí tải xuống: 4,000 VND Tải xuống file đầy đủ (3 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Bạn sử dụng đoạn code sau để phóng to khu vực cần thiết.#include #include #include #include Opt(MustDeclareVars, 1) _Zoom() Func _Zoom() Global $hGUI1, $hGUI2, $hImage, $hGraphic1, $hGraphic2, $pos, $x ,$y, $z $hGUI2 = GUICreate("Zoom", 200, 200, @DesktopWidth/2, @DesktopHeight/2,$WS_GROUP) GUISetState() $x = 120 $y = 50 $z = 100 WinSetOnTop(Zoom,,1) while 1
Nội dung trích xuất từ tài liệu:
Zoom, Phóng lớn khu vực cần thiết với AutoIT Zoom, Phóng lớn khu vực cần thiết với AutoITBạn sử dụng đoạn code sau để phóng to khu vực cần thiết.#include #include #include #include Opt(MustDeclareVars, 1)_Zoom()Func _Zoom()Global $hGUI1, $hGUI2, $hImage, $hGraphic1, $hGraphic2, $pos, $x ,$y, $z$hGUI2 = GUICreate(Zoom, 200, 200, @DesktopWidth/2,@DesktopHeight/2,$WS_GROUP)GUISetState()$x = 120$y = 50$z = 100WinSetOnTop(Zoom,,1)while 1HotKeySet({ESC},_Exit)HotKeySet({F5},_up)HotKeySet({F6},_down)$pos = MouseGetPos()_ScreenCapture_Capture (@WindowsDir&\zoom.jpe, $pos[0]-$y, $pos[1]-$y, $pos[0]+$z, $pos[1]+$z)_GDIPlus_Startup ()$hImage = _GDIPlus_ImageLoadFromFile (@WindowsDir&\zoom.jpe)$hGraphic1 = _GDIPlus_GraphicsCreateFromHWND ($hGUI1)_GDIPlus_GraphicsDrawImage ($hGraphic1, $hImage, 0, 0)$hGraphic2 = _GDIPlus_GraphicsCreateFromHWND ($hGUI2)_GDIPlus_GraphicsDrawImageRectRect ($hGraphic2, $hImage,0, 0,$x, $x,0,0,200, 200)_GDIPlus_GraphicsDispose ($hGraphic1)_GDIPlus_GraphicsDispose ($hGraphic2)_GDIPlus_ImageDispose ($hImage)_GDIPlus_Shutdown ()FileDelete(@WindowsDir&\dat.jpe)WEndEndFuncFunc _Exit()ExitEndFuncFunc _Up()$x = $x + 2$y = $y + 1$z = $z + 1EndFuncFunc _Down()$x = $x - 2$y = $y - 1$z = $z - 1EndFunc

Tài liệu được xem nhiều: