获取图片实际厘米
通过windows内置的函数获取图片实际尺寸厘米
Gui,Add,ListView,xm vMyListView r10, FileName|Width|Height Gui,Show,AutoSize,FileName-Width-Height SetFormat, float, 0.2 Return GuiDropFiles: LV_Delete() Loop, Parse, A_GuiEvent ,`n { SplitPath,A_LoopField,,, OutExtension if OutExtension not in BMP,bmp,jpg continue strPic = %A_LoopField% objImage := ComObjCreate("WIA.ImageFile") objImage.LoadFile(strPic) objImage.Width objImage.Height objImage.HorizontalResolution Width := objImage.Width/objImage.HorizontalResolution*2.54 Height := objImage.Height/objImage.HorizontalResolution*2.54 LV_Add("",A_LoopField,Width,Height) } LV_ModifyCol() Gui +LastFound win = 0 Loop % LV_GetCount("Column") { SendMessage, 4125, A_Index - 1, 0, SysListView321 ; 4125 为 LVM_GETCOLUMNWIDTH. win := ErrorLevel+win } win := win+30 GuiControl, Move,MyListView,w%win% Gui,Show,AutoSize Return GuiClose: ExitApp
autohotkey