by eValid » Wed Apr 01, 2009 5:09 pm
This is a question that comes up from time to time and the problem
is that you have this command "Focus wid" that interacts not only
with the eValid browser but also with the desktop.
Windows is a multi-programming, multi-tasking operating system and
actions in it, while they appear to be instantaneous to you, the user,
usually involve a lot of cooperation between many processes.
So, as a result of this when eValid processes the "Focus wid" command in
your script it may take a few microseconds or milliseconds before the
required focus actually changes the state of that window.
We have found that a good practice is to have your commands set up
like this:
...
Focus 0
Wait 100
SyncOnText "some text"...
...(take some action on the window)...
...
This forces a 0.1 second delay and also requires, as an extra
insurance policy, that eValid verify the "some text" is really
visible on the screen BEFORE you take an action.
Just safer that way.