Code: Select all
q:: ;excel - get selection screen coordinates and show a temporary border around the selection (tested on Excel 2007)
;[Excel_Get function]
;excel and com? - Ask for Help - AutoHotkey Community
;https://autohotkey.com/board/topic/73940-excel-and-com/#entry469769
;[JEE_Borders function]
;Internet Explorer get element under cursor (show borders, show text) (any zoom percentage) - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=29458138430#p138430
oXl := Excel_Get()
vFactor := (oXl.ActiveWindow.Zoom / 100) * (A_ScreenDPI / 72)
vWinX := oXl.ActiveWindow.PointsToScreenPixelsX(0)
vWinY := oXl.ActiveWindow.PointsToScreenPixelsY(0)
vSelX := vWinX + oXl.Selection.Left * vFactor
vSelY := vWinY + oXl.Selection.Top * vFactor
vSelW := oXl.Selection.Width * vFactor
vSelH := oXl.Selection.Height * vFactor
oXl := ""
JEE_Borders(vSelX, vSelY, vSelW, vSelH)
return
;w:: ;A_CaretX and A_CaretY retrieve a coordinate near the cell
JEE_Borders(A_CaretX, A_CaretY, 100, 100)
return
How to get X Y screen coordinates of Excel cell/Range
https://www.mrexcel.com/forum/excel-que ... range.html