save typing while clicking then replay it back?
Posted: 21 Apr 2017, 08:23
So I have a task built such that whenever I type certain words, I do an ImageSearch and the MouseClick followed by a mouseclick back into the text box where I've been typing. See code below. It works well, BUT if I'm typing quickly it causes me to lose a few characters after typing.
For example: "We discussed getting blah blah" turns into "We discussed[click click] ting blah blah".
Is there a way to save the text in a buffer and then reinsert it before the other text that's currently being typed?
Thanks!
For example: "We discussed getting blah blah" turns into "We discussed[click click] ting blah blah".
Is there a way to save the text in a buffer and then reinsert it before the other text that's currently being typed?
Thanks!
Code: Select all
:*b0:discussed::
xpos = A_CaretX
ypos = A_CaretY
ImageSearch, FoundX, FoundY, 0, 0, 200, 750, *150, C:\Users\user\Documents\PatientEducation.png
if (ErrorLevel = 1) { ; Image NOT found
;MsgBox, not found
} else { ; Image found
SetDefaultMouseSpeed, 0
MouseClick, left, FoundX, FoundY
}
Click 466, 580
return