Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. Yes, of course. Use an integer variable and increment each time. For instance in Yahoo Groups they all have a 'messageid' portion in the URL. Instead of clicking or following I simply started at 1 and incremented it each loop. Something like this: <REP3:08:000002:000001:0001:1:01:T1><NMVAR:08:01:0:0000001:0:0000000><HTTP2:1:T:http://*****.*****.*****/searchresults/articles.jsp?pg=%N1%><ENDREP> Another thing to bear in mind is not to get stuck in the mindset that you have to click on links in the web page. I often grab the web page I need with WGET (downloads the HTML w/o IE to file) then use the data in the HTML to launch IE or another pass at WGET. IOW think of navigating with a series of launches instead of trying to click on links. Oh, "View Source" works well for this also.
  2. It stops it immidiately for me. You're talking about the F8 in the scripting editor, right?
  3. My pleasure. I should have done it long ago as I keep talking about it over and over here but sometimes the abstract just doesn't cut it.
  4. Did you try CTRL+A to select all and then parse that? How about File > Save as and save it to a plain HTML file?
  5. Here's another 'trick' I learned. Initially my impulse was to do everything in one big macro. Later, due to inevitable glitches and such, I learned to break it into stages. So, for instance, I might have one macro that snatches the screen capture and dumps it into a text file with the account number in a folder. Then I might have another macro that parses those files and yet another that runs off and does something with the parsed information. This also allows more than one machine to run at the same time as well as isolating problems. Also you can have Macro 1 running while you develop macro 2. If you're doing a lot of records and you have access to more than one computer you might consider parallel tasking. I once wrote a harvesting macro that ran on several machines at many different locations and coordinated their work thru FTP. You see I had a deadline and after I did the initial macro I did the math and realized I was going to be short about 3 days! So to cut the time I ran it on several machines. Worked great. Oh, here's another trick. If running unattended I add little emails to myself of progress and such. But what if the macro halts because one time it couldn't find C1? Well I set the option to clear error messages after 10 seconds and then have a macro that scheduled to run every minute that takes a screen shot and emails it to my email account and sends an SMS message to my cell phone. Oh, and disables itself or hits a pause. If it's a huge macro with thousands of iterations it should run for a long time preventing any other macro from running. So if the other macro is allowed to run then that means the first one blew up. This way I know right away if I have a problem instead of hours later when I check myself.
  6. Millions, I've never hit a limit. I routinely process files with 30k lines with no problem. But if you run from disk as opposed to memory like I mentioned you might notice slightly slower performance. If you use ASCII File Process you are limited to 99 variables which limits the maximum number of columns but when they get more than 10 columns or so I use the tab eater method I mentioned which is practically unlimited. Your hard drive size I suppose. When I work in terminal emulators or command prompts that don't have 'controls' I usually do a screen cap or have the TE dump the screen to file. For instance I send the account number and I keep polling the screen ever second. By that I mean capture or read from file until some indicator, often a status line in the display, satisfies a condition. Lets say the status line at the bottom that literally contains"Status:processing" and changes eventually to "Status:Ready". If the poll variable is T1 I keep testing by doing Repeat until T1 Contains "Status:Ready" with a one second pause inside. This is how to effect flow control. Once I get to the screen I need I extract the contents. Depending on the terminal emulation this is often a fixed number of characters in. For instance most are 80 char so lets say it always appears in the same place on the screen 20 in on line 12. Each line is 80 char plus 2 for CRLF so 82*12+20=1004. So I Copy Part of Text 8 chars or whatever at position 1004. But if the number isn't consistent I will instead look for the position of a label like "Order Number:", adjust for the beginning of what I want, and save that to N1 and do the same Copy Part of Text. If you can show me a screen shot of what you have making sure not to include sensitive data I could probably help you more.
  7. If you check out my post on my TSV trick and use it in conjunction with Repeat With Folder that will do the trick nicely. I use this with several macros to make various file lists.
  8. I'm stoked someone benefited from all that time and head scratching.
  9. Are there any windows controls in the application itself? When I do ALT+Space X this window only maximizes to the display it's in even though this is a dual monitor setup. If the standard maximize command doesn't work and none of the window manipulation commands don't work I don't know what else one can try. It sounds like your goal is to position the screen in order to run your other macros in, is this correct? If so you should consider not using macro commands that do not rely on window positions. For instance instead of moving the mouse to do something in IE7 instead try tabbing to get the desired field. On trick I often use when developing a macro is to first try to do my task using the keyboard only. Works much more reliably.
  10. I just created this web page tutorial to demonstrate how to drive a macro from a text file instead of an application and more importantly how to accumulate the results in TSV format for ease of integration and speed.
  11. Check out this web page I just made. I think this will help you a lot.
  12. At lunch I realized there was someone else I wanted to share tis with so I'll make a quick example. Standby...
  13. Then you should hire me post haste. Seriously I wish I had more time but I have things I need to get done today. Having said that paying customers always are prioritized before volunteer work... First off the ASCII command you use is designed to convert one letter to it's ASCII value. If you try to convert a string with multiple charcters I think it only returns the ASCII decimal value for the first character. So "allen" and "adam" will appear the same in your If test. Now if I were you I would not use Excel but rather CSV or better TSV files and the ASCII or Text File Process command. You will need to take about 5 minutes to learn it but once you do you will realize a huge benefit that will reap instant rewards. Also I would output the results to a TSV file as well instead. Again it takes a few minutes to understand it but once you do you will realize it's a far superior way to accomplish the task. If you are interested start by looking at the help for these commands and I'll explain how you can create these as your output as well. I think you have Joe's book as well? He has a good writeup there. Also check out my page with the section on Tab CRLF and Hex editing. How this would work is you would use the TSV file as a list of account numbers and each repeat will pick up the next number in the var. Then you look it up in your terminal emulators, grab what you need, and push it back out to a results TSV or even simple text file. I'm guessing you're using a terminal emulator? The last bank I was working with was using a TE to access the mainframe and we simply polled the entire screen with a CTRL+A and parsed out the data we needed. Worked slick and fast especially since we didn't have to keep switching back to Excel. You know I was thinking of creating a simple macro to demonstrate how to do this. Hmmmm.... perhaps now is the time...
  14. What the heck are you trying to do? What application are you working in and what are toy trying to accomplish. You use N2 for ASCII value but I only see this used for the exit of the loop. But here you're exiting if it equals 97 which is "a". If you are searching for something that begins with "a" why don't you just use "a" for comparison? Also if you're plowin thru a large block of text like in Excel why don't you copy the entire thing first and do all the rest in memory? BTW, if you are using Excel check out F5 for selecting cells.
  15. Many and and likely all places where one uses variable requires you use caps.
  16. Bear in mind there is a fundamental rule in Windows that all things should be capable of being done without a mouse. Of course I can think of several violators but 98% of the time it's followed. And since I distribute my macros I avoid mouse moves like the plague so these lists come in handy.
  17. Or if you're saying you want a file name to contain that name just use it in the path like c:\users\fred\desktop\%T1%.txt
  18. I've already showed you how to handle this one a couple of times. Perhaps I didn't do a very good job of explaining? Is there some way I could make it easier to understand? Or maybe this is a different issue. Are you still coping stuff from Act!?
  19. Use the free software IrfanView or similar application to do the conversion. With it you can convert from a command line parameter and never even see the application. You can also specify the destination file name eliminating the need to move or copy files you create.
  20. ALT+Space then X. http://support.microsoft.com/kb/126449
  21. I use a free photo app called IrfanView and do this sort of thing often. It has batch capability as well but most things can be done from the command line. This works really well with ME and the Repeat with Folder. Also IrfanView has most all of it's commands available from simple keystroke combinations. It can't stick your ex-GF's head on a dog but it can do most common ops one would do in a batch. I could use Photo Shop as well but this program is very thin and quick and lends itself much better to automation.
  22. Not to my knowledge. But you might check Joe's utility. But I'm not sure if it's ready for prime time. Barring that you can do it with a bit of VBScript.
  23. You can also download Joe's book as a PDF which beats waiting for a month...
  24. What limitation? You said it works, correct? For the life of me I can't see why you would want to run a pop-up macro in the middle of a macro since the end result of the pop-up macro runs another macro. The only time I can see using it is when it's the last command in a macro. What is it you are trying to do?
  25. That sounds really strange, there must be something else to it. But if setting focus to another window and back fixes your problem you might just do that as a temporary fix. You could use the "Repeat With Windows" with a break right in the middle and a condition not to pick Act. This way you don't need to rely on some known program to be running in order to work. Hmmmm.... Have you tried minimizing Act? Would that no, in effect, set the focus to another window?
×
×
  • Create New...