Jump to content
Macro Express Forums

Capture Text from mouseover/dialog Box


jwood55812

Recommended Posts

Hey guys,

 

I've been trying to work ona macro and I'm not having much luck putting it together... My scenario is...

 

1) I would like to know if there's a way I can capture text from mouseover, this would eb my optimal solution because I have the rest of the macro built and just need this information saved as a variable to use later or..

 

2) If you could capture text from inside of a dialog box, not the dialog box title or anything but the actual text it displays, this would work just about as well as the other way just with a bit more editing of the variable it copies.

 

If you guys can help me out with either situation that'd be great! Thanks!

Link to comment
Share on other sites

Let me try and clarify what I'm looking to do, I apologize for the confusion. I am working with a program where in order to find out a certain piece of information, you either need to hover your mouse over a button or click this button to have a dialog box appear. If you hover over the button, the text that appears is the exact text that I would like to copy, but I'm not sure if there is any way I can capture that with ME. The other way is I can press this button and a dialog box pops up telling me the number/text I need, but had a bunch of extra text with it as well, I could copy this all since it's not an issue since I can copy part of the string. Hopefully this description helps a little bit more? I've attached a screenshot to see if it helps...

 

macroz.jpg

 

Can you provide a little more detail? I am not clear on what you are trying to do.
Link to comment
Share on other sites

Anyone? Does anyone know if theres even a function that would allow you to do this or am I wasting time?

Hi jwood,

 

I let this one sit there because I figured there would be more qualified people on the board to address it. Based on your example, I'd have to say that the only way to make it work would be to follow your "work-around" of click, capture, copy part, then ESC (or however you exit out of the pop-up).

 

I'm by no means an interweb java/SQL/XML/etc. wizard so I could be wrong, but I know how crappy it can be to ask a question and get no response.

Link to comment
Share on other sites

Oh Ok, and no worries about the no responses, I figured it was something like that, I understand. I guess you guys were talking about my workaround, but I havent actually gotten the macro to work where it would copy the text from inside a dialog box, I could do the editing of the text that is copied, but I'm not sure exactly how to copy the text from inside the dialog box. Any help on that?

Link to comment
Share on other sites

Yes, you can do this if you have an OCR-based capture utility program. I use 'Kleptomania!', available for example from http://www.snapfiles.com/get/kleptomania.html

Another is Snagit, from http://www.techsmith.com/screen-capture.asp and I expect there are several freeware programs out there.

 

I have Kleptomania set up with a hotkey <Alt+Sh>, which pops-up the cross-hairs cursor. I use that to drag a rectangle around the otherwise-elusive text, and click once more (or use the 1 key) to get it to the clipboard. So my macros simply emulate that procedure.

 

Here's an example. It's an extract from a macro that captures a summary of GPS data from a mapping program into my text editor:

 

// Get text with Kleptomania for Total Distance etc into T4

Text Type (Simulate Keystrokes): <ALTD><SHIFTD>

Wait for Text Playback

Delay: 100 milliseconds

Mouse Move: 393, 246 Relative to Screen

Delay: 100 milliseconds

Mouse Left Button Down

Mouse Move: 560, 357 Relative to Screen

Delay: 100 milliseconds

Mouse Left Button Up

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <SHIFTU><ALTU>

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): 1

Delay: 100 milliseconds

Variable Set String %T[4]% from the clipboard contents

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...