Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default How many keystrokes can I send per second?

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How many keystrokes can I send per second?

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default How many keystrokes can I send per second?

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How many keystrokes can I send per second?

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default How many keystrokes can I send per second?

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How many keystrokes can I send per second?

It is important to remember that a human is very limited in the ability to
type quickly. The standard QWERTY keyboard was designed to slow down typing,
not speed it up.

Even if you just hold a key down, the thruput is limited by the repeat rate.

We will see if SendKeys can do better!
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How many keystrokes can I send per second?

First the code:

Private Declare Function GetTickCount Lib "Kernel32" () As Long
Sub qwerty()
Dim ary(1 To 1350) As String
Dim n1 As Long, n2 As Long
For i = 1 To 1350
ary(i) = Chr(Int(((90 - 65 + 1) * Rnd) + 65))
Next
Application.ScreenUpdating = False
Range("B9").Select
ActiveCell.Clear
n1 = GetTickCount()
Application.SendKeys "{F2}"
For i = 1 To 1350
Application.SendKeys ary(i)
Next
Application.SendKeys "{ENTER}"
DoEvents
Application.ScreenUpdating = True
n2 = GetTickCount()
MsgBox (n2 - n1)
End Sub

So we make a long array of characters, record time, pump the characters into
a cell, re-record the time, and display the difference.

On my elderly Dell, I am able to get 1350 characters into a cell in about
950 milliseconds. And thats sending them one character at a time.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default How many keystrokes can I send per second?

Gary's student,

This is fantastic!- will use this to check my computer - the stats will hel
reinforce my arguments for more extensive automation at work - your help has
been invaluable.

Best wishes,

Tony

"Gary''s Student" wrote:

First the code:

Private Declare Function GetTickCount Lib "Kernel32" () As Long
Sub qwerty()
Dim ary(1 To 1350) As String
Dim n1 As Long, n2 As Long
For i = 1 To 1350
ary(i) = Chr(Int(((90 - 65 + 1) * Rnd) + 65))
Next
Application.ScreenUpdating = False
Range("B9").Select
ActiveCell.Clear
n1 = GetTickCount()
Application.SendKeys "{F2}"
For i = 1 To 1350
Application.SendKeys ary(i)
Next
Application.SendKeys "{ENTER}"
DoEvents
Application.ScreenUpdating = True
n2 = GetTickCount()
MsgBox (n2 - n1)
End Sub

So we make a long array of characters, record time, pump the characters into
a cell, re-record the time, and display the difference.

On my elderly Dell, I am able to get 1350 characters into a cell in about
950 milliseconds. And thats sending them one character at a time.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How many keystrokes can I send per second?

Glad to help!
--
Gary''s Student - gsnu200813


"Zakynthos" wrote:

Gary's student,

This is fantastic!- will use this to check my computer - the stats will hel
reinforce my arguments for more extensive automation at work - your help has
been invaluable.

Best wishes,

Tony

"Gary''s Student" wrote:

First the code:

Private Declare Function GetTickCount Lib "Kernel32" () As Long
Sub qwerty()
Dim ary(1 To 1350) As String
Dim n1 As Long, n2 As Long
For i = 1 To 1350
ary(i) = Chr(Int(((90 - 65 + 1) * Rnd) + 65))
Next
Application.ScreenUpdating = False
Range("B9").Select
ActiveCell.Clear
n1 = GetTickCount()
Application.SendKeys "{F2}"
For i = 1 To 1350
Application.SendKeys ary(i)
Next
Application.SendKeys "{ENTER}"
DoEvents
Application.ScreenUpdating = True
n2 = GetTickCount()
MsgBox (n2 - n1)
End Sub

So we make a long array of characters, record time, pump the characters into
a cell, re-record the time, and display the difference.

On my elderly Dell, I am able to get 1350 characters into a cell in about
950 milliseconds. And thats sending them one character at a time.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default How many keystrokes can I send per second?

Tried the code but it errored:

Compile error: "Only comments may appear after End Sub, End Function or End
Property.

Where am I going wrong?

Many thanks





"Gary''s Student" wrote:

Glad to help!
--
Gary''s Student - gsnu200813


"Zakynthos" wrote:

Gary's student,

This is fantastic!- will use this to check my computer - the stats will hel
reinforce my arguments for more extensive automation at work - your help has
been invaluable.

Best wishes,

Tony

"Gary''s Student" wrote:

First the code:

Private Declare Function GetTickCount Lib "Kernel32" () As Long
Sub qwerty()
Dim ary(1 To 1350) As String
Dim n1 As Long, n2 As Long
For i = 1 To 1350
ary(i) = Chr(Int(((90 - 65 + 1) * Rnd) + 65))
Next
Application.ScreenUpdating = False
Range("B9").Select
ActiveCell.Clear
n1 = GetTickCount()
Application.SendKeys "{F2}"
For i = 1 To 1350
Application.SendKeys ary(i)
Next
Application.SendKeys "{ENTER}"
DoEvents
Application.ScreenUpdating = True
n2 = GetTickCount()
MsgBox (n2 - n1)
End Sub

So we make a long array of characters, record time, pump the characters into
a cell, re-record the time, and display the difference.

On my elderly Dell, I am able to get 1350 characters into a cell in about
950 milliseconds. And thats sending them one character at a time.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Great - many thanks for your help. I'm trying to convince people at work
that lots of time will be sent in a data transfer project from one database
to another and this information will prove useful to support my arguments -
I'm also running timed tests of my program against manual input but don't
have the knowledge to time the max. keystroke output in seconds.

"Gary''s Student" wrote:

Check back tomorrow.

I'll cook up a little macro to measure system, SendKeys about 10,000
character, and measure time again.

This will give us enough information to calculate the number of characters
per second.
--
Gary''s Student - gsnu200812


"Zakynthos" wrote:

Thanks for that.

But what's the maximum, precisely, per second?

"Gary''s Student" wrote:

Many, many strokes.

The keystrokes are buffered until control returns to the application, either
directly or thru DoEvents
--
Gary''s Student - gsnu200811


"Zakynthos" wrote:

How many keystrokes can I send per second with 'Sendkeys' statements assuming
tab keys and text are mixed?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
Activate an open window and send keystrokes to it. Prometheus[_12_] Excel Programming 3 April 6th 07 05:14 PM
send keystrokes to whereis.com.au - get directions chrisho Excel Programming 1 November 19th 06 05:39 PM
Mimic keystrokes? Targus Excel Programming 1 March 8th 06 05:09 PM
Replacing keystrokes Terry Lowe Excel Programming 2 August 22nd 04 09:34 PM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"