EzHotKey 板


LINE

AutoHotkey Script Showcase http://www.autohotkey.com/docs/scripts/index.htm Screen Magnifier -- by Holomind http://www.autohotkey.com/forum/topic11700.html .开放原始码 .支援去锯齿化 .设定重绘间隔时间(Delay) .选择放大的倍数 .被放大镜挡住的部份仍可正常显示 说明: 正常版:所有按钮都在上面,用滑鼠点就可以了。 精简版: Win + A 去锯齿 Win + X 关闭放大镜 Win + P 隐藏/显示放大镜 Ctrl + Shift + 滚轮向上 放大倍率上升 Ctrl + Shift + 滚轮向下 放大倍率下降 exe执行档载点: http://www.holomind.de/ahk/magnifier/magnifier_smooth.exe 正常版: OnExit handle_exit Gui, +AlwaysOnTop +Owner +Resize +ToolWindow ; window for the dock Gui, Show, NoActivate w400 h400 x300 y50 , PrintScreen Gui, Add, DDL, vzoom , 0.5|1|2||4|8|16 Gui, Add, Checkbox, y12 x150 vantialize, Antialize ? Gui, Add, Slider, vdelay x220 y0 Range15-200 Gui, Add, Text, x340 y12 w80 vdelay2 WinGet PrintScreenID, id ,PrintScreen ; WinSet, Transparent , 254, PrintScreen ;retrieve the unique ID number (HWND/handle) of that window WinGet, PrintSourceID, id hotkey , #x , toggle_follow hotkey , +$LButton , click_through toolbar_def:=35 toolbar := toolbar_def follow :=0 hdd_frame := DllCall( "GetDC", UInt, PrintSourceID ) hdc_frame := DllCall( "GetDC", UInt, PrintScreenID ) hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", UInt, hdc_frame) ; buffer hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", UInt,hdc_frame, Int,A_ScreenWidth, Int,A_ScreenHeight) Gosub, Repaint return toggle_follow: follow := 1 - follow if follow = 1 { WinSet Region, 0-0 W%ww% H%wh% E , PrintScreen toolbar := -32 ; height of window title GuiControl, Hide, zoom } else { WinSet Region,, PrintScreen toolbar :=toolbar_def GuiControl, Show, zoom } Return click_through: if follow = 1 { Gui, Hide Send, {Click} SetTimer, Repaint , Off Sleep, 100 Gui, Show SetTimer, Repaint, %delay% } Return Repaint: CoordMode, Mouse, Screen MouseGetPos, start_x, start_y ; position of mouse Gui, Submit, NoHide ; needed to read the dropdown and slidervalue GuiControl,, delay2 , delay %delay% ms WinGetPos, wx, wy, ww, wh , PrintScreen wh2 := wh - toolbar DllCall( "gdi32.dll\SetStretchBltMode", "uint", hdc_frame, "int", 4 * antialize ) ; Halftone better quality with stretch DllCall("gdi32.dll\StretchBlt", UInt,hdc_frame, Int,0, Int,toolbar, Int,ww, Int,wh - toolbar , UInt,hdd_frame, Int , start_x-(ww / 2 / zoom) , Int,start_y -( wh2 / 2/zoom), Int,ww / zoom, Int,wh2 / zoom ,UInt,0xCC0020) ; SRCCOPY if follow = 1 WinMove, PrintScreen, ,start_x -ww/2 , start_y-wh/2 SetTimer, Repaint , %delay% Return GuiClose: handle_exit: DllCall("gdi32.dll\DeleteObject", UInt,hbm_buffer) DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame ) DllCall("gdi32.dll\DeleteDC", UInt,hdd_frame ) DllCall("gdi32.dll\DeleteDC", UInt,hdc_buffer) ExitApp 精简版(执行速度较快): #NoEnv SetBatchLines -1 CoordMode Mouse, Screen OnExit GuiClose zoom = 2 ; initial magnification, 1..32 antialize = 0 Rx = 128 ; half vertical/horizontal side of magnifier window Ry = 128 Zx := Rx/zoom ; frame x/y size Zy := Ry/zoom ; GUI to show the magnified image Gui +AlwaysOnTop +Resize +ToolWindow Gui Show, % "w" 2*Rx " h" 2*Ry " x0 y0", Magnifier WinGet MagnifierID, id, Magnifier WinSet Transparent, 255, Magnifier ; makes the window invisible to magnification WinGet PrintSourceID, ID hdd_frame := DllCall("GetDC", UInt, PrintSourceID) hdc_frame := DllCall("GetDC", UInt, MagnifierID) SetTimer Repaint, 50 ; flow through Repaint: MouseGetPos x, y xz := In(x-Zx-6,0,A_ScreenWidth-2*Zx) ; keep the frame on screen yz := In(y-Zy-6,0,A_ScreenHeight-2*Zy) ; WinMove Frame,,%xz%, %yz%, % 2*Zx, % 2*Zy DllCall("gdi32.dll\StretchBlt", UInt,hdc_frame, Int,0, Int,0, Int,2*Rx, Int,2*Ry , UInt,hdd_frame, UInt,xz, UInt,yz, Int,2*Zx, Int,2*Zy, UInt,0xCC0020) ; SRCCOPY Return GuiSize: Rx := A_GuiWidth/2 Ry := A_GuiHeight/2 Zx := Rx/zoom Zy := Ry/zoom TrayTip,,% "Frame = " Round(2*Zx) " × " Round(2*Zy) "`nMagnified to = " A_GuiWidth "×" A_GuiHeight Return #a:: antialize := !antialize DllCall( "gdi32.dll\SetStretchBltMode", "uint", hdc_frame, "int", 4*antialize ) ; Antializing ? Return #x:: GuiClose: DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame ) DllCall("gdi32.dll\DeleteDC", UInt,hdd_frame ) ExitApp #p:: MButton:: if paused = { Gui, 2:Hide Gui, Hide SetTimer, Repaint, Off paused = 1 } else { Gui, 2:Show Gui, Show SetTimer, Repaint, 50 paused = } Return ^+Up:: ^+Down:: ^+WheelUp:: ; Ctrl+Shift+WheelUp to zoom in ^+WheelDown:: ; Ctrl+Shift+WheelUp to zoom out If (zoom < 31 and ( A_ThisHotKey = "^+WheelUp" or A_ThisHotKey = "^+Up" )) zoom *= 1.189207115 ; sqrt(sqrt(2)) If (zoom > 1 and ( A_ThisHotKey = "^+WheelDown" or A_ThisHotKey = "^+Down" )) zoom /= 1.189207115 Zx := Rx/zoom Zy := Ry/zoom TrayTip,,% "Zoom = " Round(100*zoom) "%" Return In(x,a,b) { ; closest number to x in [a,b] IfLess x,%a%, Return a IfLess b,%x%, Return b Return x } --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.62.73.254 ※ 编辑: VElysian 来自: 61.62.92.141 (08/04 09:54)







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:WOW站内搜寻

TOP