Jump to content
Macro Express Forums

Stumped... Looking For Text


cyberchief
 Share

Recommended Posts

Here is what I am trying to do. Filling out a form on a webpage... I have to choose a company name with address. I have the name and address in variable T5 and T6. When I get to a webpage, there is a drop down menu where I have to choose that specific company and address. It appears like this:

 

 

I have macro express copy the page to get this detail... and the clipboard reads it like this:

 

As you can see in the first quote... not every line has the exact same amount of characters.. though almost all of them are 82 characters in length... just not ALL of them. In a list of 100, there are about 5 that are not. Also, not every company or address always has a ... after it. They will not have a ... after it if the company name or address gets towards the end of the 41 character limit per name and per address.

 

I need macro to look at the second file and decide how many times the cursor should arrow down when it gets to that drop down menu. Each arrow down will select a company name and address as in the first quote above. I just can't figure out how to get the second quote box logically broken up to do the search when note every line is 82 characters and not every line has a ... in it.

 

Any ideas?

Link to comment
Share on other sites

Are you sure that there aren’t CRLF at the end of those lines? I would check for that first. If they did exist and were not visible it would be a lot easier.

 

If not I would chew thru the variable like we were talking about in our other post here.

 

I would get the position of the first “..”, (Let’s say N1) decrement and test to see if it matches. If it does it’s one down arrow. If it doesn’t increment an integer as a down arrow counter. I would then delete the fist chunk of text from 1 to N1 then repetitively delete periods. Until the first character is not a period. Then delete the next chunk of text and again delete periods. Then repeat.

Link to comment
Share on other sites

Cory,

 

There are no CR/LF's... The site here doesn't reflect what I actually see on a notepad... In a notepad... that second quote information I provided in my post is all on 1 line.

 

I will look at the other thread. the problem I have is that I can't find any constants... sometimes there is 82 characters in a line.. sometimes not. Sometimes the line has a "..." in it... sometimes not (when the company name or company address is too long). Just too many circumstances to get my little mind around. uhg.

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