chaz Posted July 1, 2007 Report Share Posted July 1, 2007 how do i grab a URL from a website text, then grab a specific number from that eg index.php?page=xxxxxxx Quote Link to comment Share on other sites More sharing options...
wbeldman Posted July 1, 2007 Report Share Posted July 1, 2007 how do i grab a URL from a website text In Internet Explorer: use Alt+d (not shure about other browsers, but I assume they have a similar shortkey as well). Now the URL is selected, so you can copy it. then grab a specific number from that I'm not at the office with a real Macro Express so beware of typos. Make a copy of the string variable containing the URL (here T90). Find out where this page argument begins: find the position of ?page= in the URL. Variable Set Integer %N90% from Position of Text in Variable %T90% N90 + 6 is the first digit of the number you're looking for. Get rid of everything before that point (that's why you should make a copy first). Copy from T90 to T90 beginning at the N90th character until the end of the string (the 99999th character). Variable Modify String: Copy Part of %T90% to %T90% Now you have to look for the first nonnumeric charcter (or the end of the string). Repeat Count 99999, Start 1, Step 1, Place Counter in Variable N91 Repeat Start (Repeat 99999 times) Copy from T90 to T91 1 character from Starting Position N91 Variable Modify String: Copy Part of %T90% to %T91% Loop until T91 contains another character, then break If Variable %T91% < "0" OR If Variable %T91% > "9" Break End If Repeat End N91 now holds the length of the number. Copy from T90 to T90 N91 characters from Starting Position 1 Variable Modify String: Copy Part of %T90% to %T90% Quote Link to comment Share on other sites More sharing options...
Cory Posted July 3, 2007 Report Share Posted July 3, 2007 In IE use F6. In the example you gave the number will be the last part of the URL so you don't need to check every character as wbeldman suggests. 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.