Getting the text of a visible tooltip

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
DirtyDevo
Newbie
Posts: 2
Joined: Thu Oct 11, 2007 2:28 pm

Getting the text of a visible tooltip

Post by DirtyDevo » Thu Oct 11, 2007 2:36 pm

Does anyone know of a way (VBScript or otherwise) to get the text of the currently visible tooltip?

I found a bit of VBScript code to copy text from a text area to the clipboard:

strCopy=BasicTextArea.Value
document.parentWindow.clipboardData.SetData "text", strCopy

The problem is I don't know how to access a visible tooltip rather than a text area. Because of the nature of the program I'm scripting, in this particular instance I don't think I can access the control that is generating the tooltip. I need to directly access the currently visible text.

Thanks!!!!!

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Oct 11, 2007 3:19 pm

Just a thought, have not tried this.

Could you grab a screen shot of the tool tip using ScreenCapture> then OCR the resulting bitmap using the gpulawski method outlined here?

DirtyDevo
Newbie
Posts: 2
Joined: Thu Oct 11, 2007 2:28 pm

Post by DirtyDevo » Thu Oct 11, 2007 3:29 pm

Well, I thought about that, but I think it would be too slow. I'd actually be moving the mouse along a series of objects and grabbing the text from each one and I'd need it to be pretty fast.

Thanks for the idea though!!!!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts