koden Posted September 13, 2007 Report Share Posted September 13, 2007 Is there a command that can change macro speed while runing and if one or more programs is slow this day? I think on ex: "If window test does appear after more than 10 sec. then change speed on macro to normal speed" Hope you understand my question Quote Link to comment Share on other sites More sharing options...
floyd Posted September 13, 2007 Report Share Posted September 13, 2007 Take a look at the Macro Playback Speed command. Quote Link to comment Share on other sites More sharing options...
Rustywinger Posted September 13, 2007 Report Share Posted September 13, 2007 How long it takes for a window to appear wouldn't necessarily affect how quickly your macro can enter data into it once it does appear, does it? Are you waiting for a window to appear? I use some repeat loops that wait for a window to lose focus before continuing that accommodate computer speed slowdowns. Quote Link to comment Share on other sites More sharing options...
Cory Posted September 14, 2007 Report Share Posted September 14, 2007 Rusty you might consider using the "Wait for Window Title to Lose Focus" command. I used to worry a lot about speed and timing but eventually I learned that the better way was to use smart controls. This way the macro always runs as fast as it can and I don’t have to constantly tweak it for every machine. Things like waiting for a file to exist and then file to be ready. Controls are often a really good way as well. You see many time when you click a button and the program goes away to think about it some of the controls are inactivated until the program is ready to accept input. Also if you need to mouse click on a control in a popup dialog box and already have the control variable defined it works well to simply Wait for Control. This is often better than Wait for Window Title because sometimes the window will appear but not be ready yet. Also look at status bars which are usually controls. Often they will tell you something like “Loading…” and then change to “Ready” when the program is done. Wait for Mouse cursor is awesome too. Most programs will make the cursor ‘hour glass’ until it’s ready again. Anyway my 2¢ is to spend your time finding smart ways to control timing instead of tweaking speed settings. Sometimes it's inevitible but in my experiance it's only 1 time in 100 that I need to inject a dumb delay and I've never had to use the playback speed control. IMHO you will be a lot better off in the end without them. I know when you're just using a recorded macro you might not be into the scripting editor too much but if you’re getting to this stage of your macro writing you might consider writing your macros directly instead of using the recorder. The recorder is like bicycle training wheels. It’s good for driving up and down the driveway and getting your feet wet but you’ll never go fast (or corner) until you take them off. In fact just like training wheels they can be counterproductive at a certain point. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.