Jump to content
Macro Express Forums

Same Window titles


ecoast

Recommended Posts

Ok, wow to solve this would be excellent!

 

I have repetitive Data Entry work daily, and i have the input information loaded from a .csv file. (Excel)

The data is input on by browsing web pages, then moving to the next and inputting the next bit of info.

 

The thing is, that the we page titles are exactly the same. And if i use the wait for Window title, the current window has the same as the next that I am waiting, so that function is obsolete.

 

And also when waiting for a web page to load, every once in a while the browser gets choked up or timed out and, I recieve a "page cannot be displayed"

 

what i would like to do is 2 things:

 

1. be able to differentiate between the window titles, giving them a there own individuality, so that the macro WILL NOT resume until that particular page appears.

 

2. In the case i get timed out and page cannot be displayed etc... i would like to have the Macro move to the next line in the csv and start the process again from that line.

 

If i could do this, then i would not have to stand by and correct the situation. I could simply leave let the Macro run its course

 

Currently I have the progress of data entry being sent to an RSS feed and i have to check it, to see if the Macro has been choked up, and then i have to remotely correct the problem... it's a pain

 

Thanks for taking the time in reading over my problem, I do greatly appreciate it.

 

Thanks,

 

Chris

Link to comment
Share on other sites

Yes, this can be a problem. IE can have the same window title for different pages.

 

The first problem to solve is how to get Macro Express to understand that a window has changed. I would suggest using the Get Pixel Color command to trap when the color of a pixel on the screen changes. Do a search for "pixel" on this board. This technique has been used in the past to resolve this kind of issue.

 

Some people have trapped for the the end of the progress bar indicator to change color. Some have trapped for a unique area on the web page to change color. For others it's been a combination of using both the Wait for Web Page and Get Get Pixel Color commands.

Link to comment
Share on other sites

In cases like these I've had some success by polling the page contents. I use the IE command to wait for the page to load but if the page that loads is not the correct page or a 404 what does one do? Generally I do a CTRL+A to get all the text and make some sort of evaluation. EG if the page fails to display add an If T1 contains “Error: 404” the I know the load failed and to run the iteration again. Also you can use this to validate that the correct page has loaded. For instance I once harvested a Yahoo Group by visiting a URL in the form of http://blah.com/blah/messageID=12345 so 12345 was the variable and when the page loaded I grabbed the web page text (actually by using the View Source in IE) and evaluated it to see if the little line of text at the bottom of the message said “Message number: 12345” (Message number: %T1%) or whatever it was. If for whatever reason it failed it would launch the message ID again and again until it got it right. Then you can add code that would send you an email about the error if it failed a set number of times and went on to the next one. And of course log the error to a file. This eliminated many varied errors for me and I often find this approach very useful.

Link to comment
Share on other sites

thanks much!

 

ok in the case that i can differentiate between the windows, i would like to for Macro to stop and continue to the next line in the .csv and take it from the top.

 

at this point i will be fully automated... the problem is having to interact and interfere. this is a repetitve macro.. that repeats the same process 200+ times with the only difference being the data loaded and entered via the .csv file

 

thank you for your time.

 

Chris

Link to comment
Share on other sites

I’m not sure of your question but I think you’re concerned about how to repeat a failed item. If you’re using ASCII Repeat you can embed a repeat within the loop. Let’s say 5 tries and after the fifth try have it log an error instead and move on. If it succeeds have it to a Break from the inner loop. Simple!

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