AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loosing characters when send string active window

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
PeterW



Joined: 30 Mar 2006
Posts: 2
Location: Munich

PostPosted: Thu Mar 30, 2006 8:12 am    Post subject: Loosing characters when send string active window Reply with quote

I am not a native English writer, but I try to explain as good as possible. please appologize.
I created a script which is able to save strings in a *.ini file and it also is able to read within this file and write the read String into the active field of the active window. I.e. I press Shift+Alt+F5 I can enter a string, i.e. 0123456789a0123456789b, and save this string in my, let's say BSB.INI.
In the appropriate section I have saved F5=0123456789a0123456789b.
Ich have positioned the cursor in the active window in an input field.
With Ctrl+Alt+F5 I am reading in the BSB.INI at the right position. I am getting my String 0123456789a0123456789b. (watched with ListVar")
Then I am trying to send the string to my active window. It always looses the first few characters of my String. The number of lost characters is randomly. It differs of a minimum of 2 up to 7 characters.
Up to the moment I am sending the charctars to the active window I could watch with "Listvar" that the string is still complete. I also tried to send it to a message box. This also worked fine for me.
I then also tried #KeyHistroy. There I could see that the first few characters or keystrokes went lost.
It looks like I am loosing the characters or keystrokes while they are sent to the window.
Do you have any solution for me.
That would be great
Regards

Peter
Back to top
View user's profile Send private message Visit poster's website
Kevin4875



Joined: 21 Mar 2006
Posts: 5

PostPosted: Fri Mar 31, 2006 1:01 pm    Post subject: Reply with quote

I think ur computer is too slow.
You need to decrease the speed of the Send,-command.

SetKeyDelay, 2
This should do it.

But you can try higher numbers.
The higher the number, the slower the simulation of the keys.
The lower the numgber, the higher the speed of the simulation.

Greetings.
Back to top
View user's profile Send private message
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Mon Apr 03, 2006 10:45 am    Post subject: Reply with quote

P.S.:

some crappy java-applications needs
Code:

SetKeyDelay, 40


otherwise some letters are lost during SEND from time to time.
_________________
greets Grendel
Back to top
View user's profile Send private message
PeterW



Joined: 30 Mar 2006
Posts: 2
Location: Munich

PostPosted: Mon Apr 03, 2006 1:02 pm    Post subject: Reply with quote

Thank you all, you took me to the right track. I had to set a "sleep 500" before I could execute the send command. And yes you are right, the receiving application is a java one.
Laughing
Kevin4875 wrote:
I think ur computer is too slow.
You need to decrease the speed of the Send,-command.

SetKeyDelay, 2
This should do it.

But you can try higher numbers.
The higher the number, the slower the simulation of the keys.
The lower the numgber, the higher the speed of the simulation.

Greetings.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group