SendKeys - Timing issue
Posted: Fri Apr 13, 2007 9:45 pm
Hi all,
Whilst testing a script I noticed that there appears to be a timing issue when sending keystrokes to a command prompt window. More often than not only the first few characters would be sent before the script proceeded on with the next statement.
I've tried breaking up the string of keystrokes but short of adding plenty of sleep statements can you suggest anyway around this?
A developer I work with suggested instead of sending keystokes I should somehow create an object of the command window and write to that object instead.
I'm developing on a fast XP machine and testing on a slower 2K laptop.
Thanks,
James
Whilst testing a script I noticed that there appears to be a timing issue when sending keystrokes to a command prompt window. More often than not only the first few characters would be sent before the script proceeded on with the next statement.
I've tried breaking up the string of keystrokes but short of adding plenty of sleep statements can you suggest anyway around this?
A developer I work with suggested instead of sending keystokes I should somehow create an object of the command window and write to that object instead.
I'm developing on a fast XP machine and testing on a slower 2K laptop.
Thanks,
James