Jump to content
Macro Express Forums

billblinn

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by billblinn

  1. Thanks! I knew I had seen something somewhere regarding how to do this; that's probably where it was.
  2. Earlier I asked about handling exceptions, but I guess that was a question without an answer. I may now have the answer, but the answer has generated another question. I have a macro that needs to poll data from about 100 retailers. If the process fails on retailer 99, the macro would start with retailer 1 on the next run. So now I think I might operate it this way: A scheduled macro creates a text file containing the number 1. A second scheduled macro opens the file that contains 1 and stores that to a variable. The macro then opens a CSV file with information about all 100 retailers. The macro processes the information for the first retailer. Before stopping, the macro updates the file with the counter to 2. As soon as the second macro finishes, I want it to start again on the next iteration. There must be an easy way to do this, but I don't see it. Hoping this third question is the one that will attract an answer .... Thanks!
  3. I need to connect to a Web-based service to poll retailer records for approximately 100 stores per day. The menu structure varies somewhat from store to store, so I need to keep track of how many Tab keys to press for each store to position the focus on the appropriate button. Easy enough; the information is all provided by a CSV control file. But what if something changes? The store could add or drop a service and that could change the number of tabs. As a result, the application could go to the wrong place. Once I'm logged on, the window-like panels are created (apparently) by an ActiveX control. Because of this, I can't wait for the window title. I can see 4 places in the script where trouble could occur (noted below as "failure points" 1 through 4. I'm looking for a way to detect errors here and, if there is an error, stop the macro. Variables from CSV text file: Login (T21) - Password (T22) - Co# (T23) - Job (T24) - File Count (T25) - File (T26) - Tabs-Extract (T27) Tabs-Job (T28) - Tabs-Close (T29) - Tabs-Exit (T30) - Retailer-directory (T31) - Project-subdirectory (T32) Dates (T33) - OK button present (T34) - Output directory (T35) - Begin date = one year ago (T91) - End date = today (T92) The following code-like text shows the overall structure of the macro, but is not really code. LOGFILE:VIP.log—Starting ... LOGFILE:VIP.log—######### Retailer %T31% *** PROCESS TEXT FILE BEGIN Delete files in local download directory. Open browser and logg on with %T21% & %T22%. Use mouse to click work button. (POSITION MAY VARY depending on IE plug-ins.) Second log in requires the password a second time. The login window (a pop-up) must be selected and moved or the password cannot be entered. Windows from this point on do not report their names; all I can do is wait. Wait 10 seconds, then use Tab to position cursor on Reports button. Enter. (Failure point 1) Wait 10 seconds, then use Tab to position cursor on appropriate Report. Enter. (Failure point 2) *** IF T33 > 0 Enter start date and end date *** ENDIF Wait for file to be ready, then click OK. *** IF T34 > 0 Enter to click "OK". *** ENDIF Tab to Close button. Enter. (Failure point 3) Tab to Exit button. Enter. (Failure point 4) Close the browser. Connect to ftp site. Chage to directory specified by T31/T32/. Send file specified by T35\T26 *** PROCESS TEXT FILE END LOGFILE:VIP.log—Process complete! Thanks!
  4. I have a situation where I need to open a website, select a login option (providing a user ID and password), then open a secondary login window that has the user ID filled in, press either the space bar or Enter to activate the window, type the password a second time, then select an option from a pop-up menu. Open website and maximize the browser. (No problem.) Type user ID, tab, password, Enter. (No problem.) Click button on Web interface. (No problem.) Wait for window to open, give it focus, and press spacebar to activate it. (No problem.) When Macro Express tries to send the password a second time, nothing happens even though the control, which seems to be an ActiveX applet, registers the spacebar or the Enter key. I have tried slowing the key rate to half a second between keystrokes, waiting 5 seconds between the time I send the space or Enter (I've tried both) and when I send the password. Nothing works. Ideas would be most welcome!
×
×
  • Create New...