Jump to content
Macro Express Forums

if commands for websites


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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?

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.

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.

  • Create New...