NeVeR Posted November 14, 2012 Report Share Posted November 14, 2012 I've over 1000 pages that i need to copy 1 bit of text from the source code of.. and i want to write a marco for it. I've all the URL's in a spread sheet. getting them to open in browser is fine... then i can use CTRL+U to open the source. Each webpage has a page ID it's in the source code as class="pg-1" or "class="pg-5845" just because I've 1000 pages it's not from 1 - 1000 .. some page ID's are like 123532543 etc. I can get the macro to find class="pg- and then the tricky part. How can i get the macro to find the numbers and know how many there are.. sometimes there will be 1 or 2 and then there will be 9 or 10. the good thing is there is a " after the numbers.. So there might be a way to tell the marco to stop or something.. I'm not sure to be honest. Does anyone have any ideas ? thanks. Quote Link to comment Share on other sites More sharing options...
Samrae Posted November 14, 2012 Report Share Posted November 14, 2012 The way I would tackle this is to copy of the original information to a new variable, use the "Variable Set Integer from Position of Text" command to find the needed tag, then use the "Variable Modify String: Copy Part of" command to copy or delete parts of the original source information as needed. Repeat the steps with different tags. Eventually you may wind up with a string that contains both letters and numbers. You can loop through that string one character at a time and copy out only the numbers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.