Jump to content
Macro Express Forums

Resume After Input From Telnet


napabrown
 Share

Recommended Posts

I am ready to get a decent keystroke playback solution, but wanted to make sure the one thing I need can be done with Macro Express.

 

I use my present product for mainly one task. I regularly log in to an online provider and download raw real estate data. The menu system on this system requires me to return to the top level after each county's data is downloaded. With over 50 counties in California, I have simplified this process with a keystroke playback program.

 

But: It could be so much easier if my macro could wait for the text "download completed" to appear in the text window, then resume. In other words, I am not typing the words with my keyboard. Those are the last words that appear in the session before I enter commands to get back to the top of the menu structure to select another county (and start all over).

 

A time pause doesn't work because, for example, Napa County takes about 30 seconds to download and Los Angeles takes about 15 minutes. The only thing in common is that the words "download completed" are fed by the data provider after each chunk of data.

 

Thoughts? I sure hope there a way I can start one macro and download all the data while I am doing other stuff. Thanks in advance for your thoughts.- David

Link to comment
Share on other sites

Another thing you might try is to use a repeat loop in your macro that copies everything in the text box to the clipboard. Once in the clipboard you can copy it into a variable and check for the Download Complete message near the end. I would include a delay command so it only checked every 10 seconds or so. Something like this may work:

// Repeat for a maximum time of 30 minutes (approximate)
Repeat Until %N1% >= 180
 
 // Highlight everything in the box
 Text Type: <CTRLD>a<CTRLU>
 
 // Copy to the clipboard
 Text Type: <CTRLD>c<CTRLU>
 
 // Check to see if the Download is Complete
 If Variable %T1% contains "Download Complete"
   Variable Set Integer %N1% to 999999
 End If
 
 If Variable %N1% < 999999
   // Delay a little. Only check once every 10 seconds
   Delay 10 Seconds
   
   // Increment the maximum counter
   Variable Modify Integer: Inc (%N1%)
 End If
Repeat End

But, if you can make it work, I like Jason's suggestion to use the Wait For File Ready command better.

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