Code: Select all
If CaretGetPos(&mcx, &mcy)
ToolTip "::" newTrig "::" newRepl, mcx-15, mcy+140, 6 ; <--- LOCATION of tooltip is set here.
Else
ToolTip "::" newTrig "::" newRepl,,, 6
The tooltip is designed to occasionally appear as I'm typing, so I don't want it to cover the text I'm currently typing. In theory, it should only ever appear when I'm typing, so CaretGetPos should always return mcx and mcy. While debugging, the tooltip always appears where it is supposed to (an inch or so below my typing), but sometimes while I'm typing at work, it will cover my text. I've increased the mcy+n value a couple of times but it keeps happening. I "think" I've ruled-out screen scaling issues. It's also noteworthy that I've embedded Just Me's Class ToolTip Options, but I don't believe that the problem is coming from there.
Actually... As I type this, it occurs to me that I can put a unique-sounding SoundBeep in the Else block. Like that's the only thing I can think of, is that occasionally the CaretGetPos is returning false, that so the ToolTip appears near my mouse cursor...
Can you think of other things that might cause the tooltip to appear in the wrong spot?? Please note that mcx and mcy do not appear anywhere in the code other than the two locations seen above.