Jing Posted July 5, 2012 Report Share Posted July 5, 2012 Just wondering if there is a way to have an if command test usernames for multiple websites. for a username that i enter might only work on one of the four different sites... so what i am looking for is the first website loads and attempts to sign in. if it fails i would like the macro to test on the remaining three sites. if it was successful the macro can just end. is there anyway to script this in macro express??? Quote Link to comment Share on other sites More sharing options...
Jing Posted July 5, 2012 Author Report Share Posted July 5, 2012 <REM2:********************* First *********************><HTTP2:1:F:http://website 1><WAITWEB2:000000:000005:http://website 1><MSD:175><TEXTTYPE:%T2%><MSD:175><TEXTTYPE:<TAB>><MSD:175><TEXTTYPE:0000><MSD:175><TEXTTYPE:<ENTER>><REM2:********************* Second *********************><HTTP2:1:F:http://website 2><WAITWEB2:000000:000005:http://website 2><MSD:175><TEXTTYPE:%T2%><MSD:175><TEXTTYPE:<TAB>><MSD:175><TEXTTYPE:0000><MSD:175><TEXTTYPE:<ENTER>> Quote Link to comment Share on other sites More sharing options...
paul Posted July 5, 2012 Report Share Posted July 5, 2012 I'd do as follows: - Place all the URLs into a text variable, delimited by some separator character, or fixed length (e.g. each URL is 100 characters long) - Place all the userids into a 2nd text variable, delimited or fixed length - Place all the passwords into a 3rd text variable, delimited or fixed length Write the main code within a repeat loop, repeating 4 times. Within each loop, extract the next value from each of your 3 text variables, and do the processing, exiting the macro when successful. Fixed length will make the extraction simpler, e.g. extract characters 1-100, then 101-200, etc., where you hold the start position in an integer variable; alternatively, you search for the next separator and extract accordingly. Quote Link to comment Share on other sites More sharing options...
AndreaSchmitz Posted July 21, 2012 Report Share Posted July 21, 2012 Paul -- in theory, I could add a fourth text variable, right? Let's say the URLs are postable social media sites, I could then put various status updates or even longer messages (like articles) and have them posted to the site before moving to the next URL. If I were to do this using the fixed length, would I just add -spaces- to meet the length? Say I have four articles, one is 125 characters long, the next is 2387 characters long, the next is 45 characters and the final one is 9342 characters long. Or would it be best then to use a | delimiter (or anything else which would NOT naturally find it's way into a text variable set up? Quote Link to comment Share on other sites More sharing options...
paul Posted July 25, 2012 Report Share Posted July 25, 2012 I personally always use the delimiter approach - I then don't need to count characters to ensure a constant fixed length. 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.