Jump to content
Macro Express Forums

Move Mouse to Highlighted item


sunilvedula
 Share

Recommended Posts

The only way I can think to do it, is scan and record pixel colors on the screen before the "find". Then scan again after the find, and where pixel color has changed due to highlighting is where you want to move the mouse to. I fear this would be unacceptably slow with Macro Express, if you scan every pixel. However, if you know that a highlighted word will cover a minimum of, say, 20 pixels high by 40 pixels wide, then you could scan in increments of maybe 10 by 20 pixels and reduce the time considerably. (I'm just making very rough estimates here.) It still might be unacceptably slow. The only way to find out would be to write the logic and try it. Shouldn't be too hard to code it.

Link to comment
Share on other sites

thanks for your reply. i tried exactly what you said. i estimated my regular area where my data would lie and took approximation of in and around that area which i know it will highlight. so i told my macro to move around the estimated area and look for the highlighted pixel color and then move few points beside and copy the data. this is working fine but my doubt is if i need to look for some thing else which area i am unaware then how do i do? by doing ctrl f (find) if it find how do i my mouse to that area. Any other faster way or anything else?

Link to comment
Share on other sites

i tried exactly what you said. i estimated my regular area ... told my macro to move around the estimated area

That is not exactly what I said. I said analyze the whole screen both before and after the "find".

 

But here is a variation on your method of estimating the area where the text will be:

Treat the whole window as the "estimated area". First, in order not to have such a large area for pixel checking, use ME commands to re-size the window to be very small, maybe a quarter or a tenth of the screen size. Making it full-screen width, but one-tenth screen height, would be a good starting point for testing. Then when you do the "find" most browsers and other applications will bring found data to within the display window, giving you a much smaller area to search compared to the full screen.

 

No guarantee that it will work, but it's worth a try.

Link to comment
Share on other sites

i have figured it out and it works extremly fine and i have put it out for testing on live systems. Need to wait for the results though. For me ti worked fine. I am putting out the code for anyone it might be useful to pull data from webpages where the action of tab and arrow is nullified. Last but not the least a ton of thanks to brandon who gave me this idea.

TEST.MEX

Link to comment
Share on other sites

i have figured it out and it works extremly fine and i have put it out for testing on live systems. Need to wait for the results though. For me ti worked fine. I am putting out the code for anyone it might be useful to pull data from webpages where the action of tab and arrow is nullified. Last but not the least a ton of thanks to brandon who gave me this idea.

 

 

no worries,

 

Hows the deployment? anybody having issues?

Link to comment
Share on other sites

Deploying it today and people here are quite excited as it has resolved lot of problems. One issue remains though. If you look at the text file i sent you i am unable to pull the customer name as there is no common identifier. I will have to copy the entire things till Org and then need to subtract the integer values. Can you look and let me know if anything else can be done abt it

Link to comment
Share on other sites

hi ,

 

all problems reslved. able to copy everything. thanks. the sol works miracles

but is it possible to count if how many times is a particular text repeats itself in the variable? i was able to do it by deleting the text i found and then counting again the same putting it in a repeat loop. it works fine. but is there a better alternative solution rather than this.

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...
 Share

×
×
  • Create New...