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燈, 水草

請輸入看板名稱,例如:BuyTogether站內搜尋

TOP