Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Controlsend and "Shift-Chars"


  • Please log in to reply
3 replies to this topic
Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
One of my tools makes extended use of Controlsend and there are often problems with Shift (2 characters are uppercase, but only the first one should be uppercase or no character is uppercase, but the sentence/word should begin so).

Also Characters like "@" have problems (sometimes shown as only "q", because lying on this key (for explanation if it isn't so in english layouts, too))

I think this is a general problem so I do not post any code.

Thalon

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Have you experimented with different settings of SetKeyDelay, such as:
SetKeyDelay, 10, 10
SetKeyDelay, 0, 10
SetKeyDelay, 0, 0

Although ControlSend generally works well with simple apps that use standard controls (like Notepad), more complicated things might require tweaking or custom use of PostMessage.

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
I am just writing to an edit-control of a programm, but I'll try to change SetKeyDelay (didn't do this any time before).

Thx for help, I am shure it will work as ever :D

Edit: Yes, it works now! :D It occured only one time under heavy CPU-load that a problem occured with uppercase.. :)

Thalon

dougcosine
  • Members
  • 1 posts
  • Last active: Feb 19 2015 01:47 AM
  • Joined: 19 Feb 2015

10 years later and this is still a problem!

 

I found that when using the SciTE4AutoHotkey IDE, this problem does not occur if you execute in debug mode and set a breakpoint before your first ControlSend.

 

My script was sending '=' for '+', '!' for '1', etc but if I stopped the script with a breakpoint and then let it continue, it ran perfectly.

 

This of course doesn't solve the problem for the end user, so I tried setting the key delay and

 

SetKeyDelay, 0, 10

 

worked for me!

I'm sending input to the AnzioLite terminal emulator that is running an acucobol program.