Re: [AHK-] 抓取圖檔高度和寬度的方法

看板EzHotKey作者時間15年前 (2010/06/28 12:16), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
參考了官網的help,寫了下面這個東西,可以得到圖檔的寬跟高: --------start---------- ; Example: A moving progress bar overlayed on a background image. link = C:\test.png ;圖檔連結 Gui, Add, Picture, x0 y0 , %link% Gui, Show WinGetActiveStats, A, Width, Height, X, Y WinSet, Transparent, 0, a ;讓當前視窗透明度為10 Width := Width -17 Height := Height -38 MsgBox, The active window "%Title%" is %Width% wide`, %Height% tall`, and positioned at %X%`,%Y%. ExitApp return GuiClose: ExitApp ---------end----------- 不過缺點是路徑不能有中文...圖不能超過螢幕大小... 還在嘗試克服中。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.147.6.242 ※ 編輯: kslman 來自: 122.147.6.242 (06/28 12:21)
文章代碼(AID): #1CA28wgu (EzHotKey)
文章代碼(AID): #1CA28wgu (EzHotKey)