Solved

Timing

Posted on 2003-11-19
13
740 Views
Last Modified: 2010-05-01
Hi

I'm using sendkey to fill some form field. Unfortunately sendkey is too fast thats why the form is not filled properly. So tried to add a 'sleep(ms)' command before each sendkey command. Also this give me troubles, maybe because kernel. Now I'm trying to replace the sleep function with 'Wait' (which is working) but lowest level is in seconds and not in ms (Application.wait(1000) not working). Is there another way to solve this problem?

Thx mg
0
Comment
Question by:mgroyal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
13 Comments
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9779743
Try putting your sleep commands in after each sendkey instead of before it. I normally give 2000ms for each keystroke.
0
 
LVL 1

Author Comment

by:mgroyal
ID: 9779838
I can't use the Sleep Function because the background process should go on...
0
 
LVL 1

Author Comment

by:mgroyal
ID: 9779899
increased to 150 for proper solution
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9779989
What background process, you said yourself that you were wanting the application to wait. If you want a seperate process then create one that is independent of the sendkey process.
0
 
LVL 1

Author Comment

by:mgroyal
ID: 9780084
I'm sending data with sendkey to a 'report request'. The report request is a macro in excel and get the data from oracle for displaying them in excel. There're several bg-processes like db-connection etc. Anyway when I'm using sleep function the form is freezing (conflict?) for about 5 seconds and after data nothing happens (Also when I use sleep after sendkeys). When I'm using the wait function it's working (wait does not stop the backround processes) but I can't wait 1 second for every key which I sending. I need ms...
0
 
LVL 9

Accepted Solution

by:
TooKoolKris earned 150 total points
ID: 9780180
Oh, I see what you mean now. This is a long shot but see it the wait function will accept a decimal like .5
0
 
LVL 1

Author Comment

by:mgroyal
ID: 9780190
solved....
0
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9781178
how so?
0
 
LVL 1

Expert Comment

by:anaadoul
ID: 9805100
please close the question or delete it

---------------------------------
There Are 10 Kind OF People
Those Who Understands Binary AND Those Who Don't
0
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9811886
Yea, and along with your solved solution how about posting why I should accept fewer points while your at it.

Thanks
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question