Jump to content
Macro Express Forums

Can we avoid mouse movement to capture data on a web page


sunilvedula

Recommended Posts

HI all,

i have tried tab, arrow down etc.. with keyboard to caputre data on a web page (kind of application) but the only thing it allows me is to move mouse and copy with mouse. I can do ctrl f (find option) to find the letter associated with it like :

 

Cardholder Name: sunil. the find option will take me to cardholder name but i dont know how to make the mouse or anything to realise to make it goto that location as tab or arrow wont work.

 

any ideas?????/ :lol: Also by the way controls are not working in those areas. i tried beneat mouse, control focussed etc... but to no vail.

Link to comment
Share on other sites

Did you try CTRL+A to select all and then parse that? How about File > Save as and save it to a plain HTML file?

 

i think i will need to explain in detail. we cannot do parse or ctrl a the reason solely because the macro will be used realtime ( the associates will be processing cases). so what i was trying to do was make the associate work easy. we have a tool called chordiant which we process cases and it is on a server which is accessed through internet. we use mouse most of the time . now what have i done is automated most of the stuff. But the only problem i am facing is that when the macro or associate click on a button (the control is not being recognized, so i use tabs to reach the buttons) a screen opens within the main screen and i cannot make the macro recognize tht screen. i have tried various ways but no result. so what i was trying was to find a unique letter and do a ctrl f and copy it and do that until it finds it and then let the macro work again. this is because the amount of time it takes for the screen to come depends on various factors (like computer speed, inernet speed etc....). it can vry from 2 sec to 20 sec. if it comes early within 2 sec and i make the macro wait (by giving time delay) then the associate feels it is a waste of time and he can do it faster. So, this is the situation i am stuck in and i dont know how to make the subwindow (or subscreen) to recognize so that the waiting time for my macro becomes less and my macro will work more efficiently.

Link to comment
Share on other sites

I have had cases like this and in fact I am working on one right now. The window is Java so I can't interact the same way I usually do and something like View Source will show nothing useful. When a region of the screen updates I found that if I mouse click in it and then do a CTRL+A it highlights all the text in that rectangle. I then take off with that and do my thing. So you might try that. But there are many different scripting languages and ways of doing things so I can only make guesses for you. If, somehow, you could show me one or something like it I could probably figure it out. Normally my first approach in these difficult cases is to figure out how a human can do it then go from there. So how can a person highlight this screen for you?

 

I've even experimented with using OCR. I have a simple OCR pen and the software allows one to paste a graphic in and will return the text to the clipboard. This way you can just copy a region of the screen and have it 'read' it for you!

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Cant put the screen shots. sorry! <_< ALso i wanted to know if we chage the screen resolution will the data that is being captured with mouse would that get affected. IF i change screen from TFT OR LCD OR NORMAL SCREEN would that effect the macro (mouse pointer) captures the data. Pls advised ASAP! If it does any way to avoid it.

Link to comment
Share on other sites

Generally not. For instance a web browser is the same pixel dimensions on either resolution but I have one I'm working on right now where inexplicably the beginning of a sometimes invisible progress indicator moved over one pixel on a different machine. Strange things will make minor differences so hitting the middle of a button is usually easy but grabbing the edge of something or finding a black pixel in text can be tricky. Usually I write a simple macro to check the display to make sure everything's aligned before running the real macro and save the locations in the local registry instead of the macro. Also I've made some macros that will scan an area with Get Pixel Color tests or have it scan a region instead of looking for an exact pixel. For instance the progress indicator I told you about that moved... I know scan a line of pixels looking for the edge of the progress indicator. As soon as it sees the edge it will bail. But a good safeguard is to add a Get Pixel Color after your mouse move and before clicking. If it's a gray button you're looking to click and the pixel color is something else you're in trouble.

Link to comment
Share on other sites

Generally not. For instance a web browser is the same pixel dimensions on either resolution but I have one I'm working on right now where inexplicably the beginning of a sometimes invisible progress indicator moved over one pixel on a different machine. Strange things will make minor differences so hitting the middle of a button is usually easy but grabbing the edge of something or finding a black pixel in text can be tricky. Usually I write a simple macro to check the display to make sure everything's aligned before running the real macro and save the locations in the local registry instead of the macro. Also I've made some macros that will scan an area with Get Pixel Color tests or have it scan a region instead of looking for an exact pixel. For instance the progress indicator I told you about that moved... I know scan a line of pixels looking for the edge of the progress indicator. As soon as it sees the edge it will bail. But a good safeguard is to add a Get Pixel Color after your mouse move and before clicking. If it's a gray button you're looking to click and the pixel color is something else you're in trouble.

the problem i face is it is neither a button nor a text box or a drop down. it is a text on the webpage. the controls are useless (or i dont know how to use them properly) but it did not make a huge difference lucky me :P . But it is making a issue where the web page(chordiant) uses java. the positioning of the text changes with the screen resolution. Any ideas??

Link to comment
Share on other sites

I sometimes use GetPixel Color to seek positions. Start at pixel N1,N2 and repeat, each time incrementing N1 or N2 until the desired color is found. But its slow so not an ideal solution.

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