Love this! Thank you! I ALMOST have it working for what I need. I am NOT a developer. But, I can often take existing code and tweak it a bit ![Smile :-)]()
I need to go to a specific coordinate on the screen. I have text that pops up with mouse over, and that is what I am trying to grab. That is working great, and I can see the text in the tooltip. I just need to copy the text to the clipboard (I can put it into excel easily)
I don't actually need the red box or tooltip, but they don't hurt anything. I'm sure it's easy, but I am struggling! This part just need to be copied to clipboard instead of tooltip "OCR.FromRect(X+55, Y-55, 120, 40,,2).Text, , Y+40)" Can anyone help?

I need to go to a specific coordinate on the screen. I have text that pops up with mouse over, and that is what I am trying to grab. That is working great, and I can see the text in the tooltip. I just need to copy the text to the clipboard (I can put it into excel easily)
I don't actually need the red box or tooltip, but they don't hurt anything. I'm sure it's easy, but I am struggling! This part just need to be copied to clipboard instead of tooltip "OCR.FromRect(X+55, Y-55, 120, 40,,2).Text, , Y+40)" Can anyone help?
CODE:
#Requires AutoHotkey v2.0
#include .\Lib\OCR.ahk
CoordMode "Mouse", "Screen"
CoordMode "ToolTip", "Screen"
X_Search_Box:="1100,135"
Y_Search_Box:="1200,135"
Jump_To:="1260,150"
^9:: ;Run
{
Click X_Search_Box, 2
Send 555
Click Y_Search_Box, 2
Send 555
Click Jump_To
Click 1300,900
Click 1290,850
}
Loop {
MouseGetPos(&X, &Y)
Highlight(x+55, y-55, 120, 40)
ToolTip(OCR.FromRect(X+55, Y-55, 120, 40,,2).Text, , Y+40)
}
Highlight(x?, y?, w?, h?, showTime:=0, color:="Red", d:=2) {
static guis := []
if !IsSet(x) {
for _, r in guis
r.Destroy()
guis := []
return
}
if !guis.Length {
Loop 4
guis.Push(Gui("+AlwaysOnTop -Caption +ToolWindow -DPIScale +E0x08000000"))
}
Loop 4 {
i:=A_Index
, x1:=(i=2 ? x+w : x-d)
, y1:=(i=3 ? y+h : y-d)
, w1:=(i=1 or i=3 ? w+2*d : d)
, h1:=(i=2 or i=4 ? h+2*d : d)
guis[i].BackColor := color
guis[i].Show("NA x" . x1 . " y" . y1 . " w" . w1 . " h" . h1)
}
if showTime > 0 {
Sleep(showTime)
Highlight()
} else if showTime < 0
SetTimer(Highlight, -Abs(showTime))
}
Statistics: Posted by Jscottj — 31 minutes ago