Keys not being always being sent???

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mark@HOB
Newbie
Posts: 6
Joined: Fri Jun 27, 2003 10:10 am
Location: Malta (Head Office in Germany)
Contact:

Keys not being always being sent???

Post by Mark@HOB » Mon Jun 30, 2003 8:01 am

Hi,

I was pretty proud of myself after I created a script that successfuly created a file, renamed it, copied it a couple of times and deleted all files in a folder. ok ok, it's very simple but when I tried it the same script out on a different OS I had problems:

At one point I set focus a window (windows explorer) and send a key that corresponds to the first letter of a filename (so that file will be highlighted). I take care to make sure the that file is the only one starting with that letter. On my machine (Windows NT) it works perfectly but on another it is inconsistent (sometimes it works and sometimes it doesn't). For example in one user account on a Win2003 server, it works ok but in another user account on the same machine it is as if the key is never sent. I have tried pressing to key manually and it works so the focus on the window has been correctly set apparently.

Any help would be GREATLY appreciated.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jun 30, 2003 4:25 pm

Hi Mark....

Here is a response I submitted a few days ago to a similar issue:
=======================

Just some comments about my experiences with Macro Scheduler.

I also have been using it for many years, and have seen it operating on different environments and operating systems. But one thing I have found can make a big difference, and that is the use of the WAIT> command.

I have found that if I add Wait> commands, or make the existing ones longer, some intermittent issues go away.

This has been most noticeable after the PRESS/RELEASE ALT/CTRL keys. and the SEND> command. I know decimal values can be used, but I generally use the value of 1 or 2. Of course if speed is a big issue, then using smaller decimal values may be more important to you.

Another area is that has had an impact is the SK_DELAY variable. The default is 0, but I have made it a habit with all my macros that use SEND> commands to start with a value of 2. I know in one instance I had to kick it up to 10.
=======================

I suspect that these work because systems will have different race conditions at times. Even the same machine will perform differently, never mind moving the same macro to a different system.

Hope this helps..........good luck,
Bob

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts