My system is moderately powerful, it is a Windows 10 24 Gb I7-6700 laptop, and some scripts do appear to have some random variable. I wonder whether it is that Windows 10 sometimes conflicts with AutoHotkey?
Take this script, for instance.
Code: Select all
^u::
clipboard=
Send ^x
ClipWait
StringUpper, Clipboard, Clipboard ; Convert text to upper
SetKeyDelay, 90
Send %Clipboard%
RETURN
Now, perhaps that is a Windows issue. I have seen in some forums that Copy paste presents some problems in some users, but I don't really know whether that is the case.. it seems strange that something so basic for Windows should be giving problems at OS level, right?
Whatever the reason that may be, there is a second issue with the above script. It works... most of the time. I have checked time and time again and the conversion to uppercase is "mostly" working. By "mostly", I mean that I select the string "I want all of this to be in uppercase", sometimes I will get "I WANT ALL OF THIS TO BE IN UPPERCASE", but sometimes "I WANT ALL OF thIS TO BE IN UPPERCASE", or "I WANt all oF THIS TO BE IN UPPERCASE". In a particular case, I wanted to change "Diagnóstico" to "DIAGNÓSTICO" by using the script and the result I obtained was DIAGÓSTICO.(notice eating up an "n") That behaviour, on the contrary, is quite consistent, but not always. Sometimes, the result is DIagnÓSTico, DIAgnÓSTICO, DIagnÓSTICO (3 consecutive attemps done RIGHT now as a test)
I discovered that adding the SetKeyDelay, 90 improved things in a percentage (that is, they tended to work better, not perfectly but better)
Any ideas? I will give a last piece of information. These problems tend to happen within Trados Studio. I have been performing this procedure in MS Word or Notepad for 10 times in a row and they seem to work 100% of the time. So the question might be "Does anyone have this similar problem with Trados Studio"? Might it be that this particular software conflicts with Autohotkey in a way (by an internal process or something) that gets in the way? Is there any solution, like FORCING autohotkey to take control until the script is resolved?
The issue with clipboard getting stuck seems to happen everywhere in Windows, though, very randomly. Perhaps a background thing taking use of the Clipboard? I am sure someone has to have a similar situation! Sometimes the keyboard gets stuck (it seems to be Control, or Alt, or such Function key )and the solution is to wait and press several keys randomly until it gets unstuck or, a quicker solution, kill Autohotkey. That solves the "control key stuck and interfering with Notepad, Windows, Internet Explorer and anything else"
I would appreciate some insight, as I am lost in here! I just upgraded Autohotkey to version 1.1.27.07 from 1.1.24.04 and nothign changes. If there is some other info or test I can do to narrow things down or help you locate the problem, don't hesitate to tell me so!
P.S. Meanwhile, I am going to start killing background processes and see if/when this stops happening...