Jump to content
Macro Express Forums

Cycling Endlessly


InsiderSource
 Share

Recommended Posts

Hello Experts!

 

I'm have difficulties figuring out the "Repeat" command.

 

Right now, I'm using it to copy and paste each of my newsfeeds to notepad. It works perfectly, however, I don't know how to stop it from cycling endlessly.

 

I can't define the number of times it should run because every day there's a different amount of articles that come through the newsfeeds. Any suggestions?

 

I tried using the "Repeat Until" command and I made the T1 value = 0. That didn't work. Although I don't really understand this function at all.

 

I hope the experts out there can help me out here. I would really appreciate any feedback. :)

Link to comment
Share on other sites

If you can determine when you need to stop, you can use a Break command to stop the repeat. Something like this:

Repeat Start (Repeat 10 times)
 // Do your stuff here
 
 If Variable %N1% = 0
   Break
 End If
Repeat End

You should also be able to use the Repeat Until command doing something like this:

Variable Set String %T1% ""
Repeat Until %T1% = "DONE"
 
 // Do your stuff here
 If Variable %N1% = 0
   Variable Set String %T1% "DONE"
 End If
Repeat End

Both of these examples depend on you adding code to set N1 to 0 when you want the repeat loop to end. You could use other integer or string variables as well. Just detect the case where there are no more newsfeeds and set a variable. Then check the value of that variable similar to what is shown above.

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