Jump to content

[bug] AutoItX and keystokes for scripts


Paff
 Share

Recommended Posts

Hi,

I have the same bug from a lot of time. I use a lot of VBS/AutoIt scripts under some software and use keystrokes to start them. For example when I use ctrl+h to start my script, control key is pressed when script is finished. When I press keystroke real fast everything is ok. I try a lot of tricks to turn off control key but without success (oAutoIt.Send "{CTRLDOWN}"; Set oAutoIt = Nothing; WScript.Quit... doesnt work). Please try write simple vbs script with some send/controlsend instructions and test it... I use WScript host v.5.7 and windows xp sp2/sp3.

sorry for my english and all the best

thanks for great work! :P

Link to comment
Share on other sites

I still dont understand

ok, I try again...

I have a PC :(

I have a vbs/autoit script.

I have a software (for example foobar2000 media player)

I have a keyboard shortcut at foobar2000 which start my vbs/autoit script.

and now:

- when script is finish, keys for keyboard shortcut are DOWN, are PRESSED, are LOCKED :P

- when script is finish, I must press and release ctrl or shift key for unlock

- when I release keyboard shortcut keys fast (before script start) everything is ok

- every vbs/autoit script starting from keyboard shortcut has the same strange feature

autoit remember keys position before script start? is there someone who was the same symptom?

Link to comment
Share on other sites

Try these options (from helpfile) -

Opt("SendKeyDelay",...) alters the the length of the brief pause in between sent keystrokes.

Opt("SendKeyDownDelay",...) alters the length of time a key is held down before being released during a keystroke.

Set both "SendKeyDelay" and "SendKeyDownDelay" to 0 to remove all delays when sending keystrokes. This may be required under certain circumstances, for example, when locking the system ("#l") it may be necessary to remove the delays in order to prevent the WIN key from being stuck down.

Link to comment
Share on other sites

  • 5 weeks later...

Try these options (from helpfile) -

Opt("SendKeyDelay",...) alters the the length of the brief pause in between sent keystrokes.

Opt("SendKeyDownDelay",...) alters the length of time a key is held down before being released during a keystroke.

Set both "SendKeyDelay" and "SendKeyDownDelay" to 0 to remove all delays when sending keystrokes. This may be required under certain circumstances, for example, when locking the system ("#l") it may be necessary to remove the delays in order to prevent the WIN key from being stuck down.

Let me try to translate for suaff as I am having the same problem and the suggested solution of setting SendKeyDelay/SendKeyDownDelay to 0 did not solve the issue.

The issue at hand is when an AutoIt script is launched using a keyboard shortcut such as CTRL+SHIFT+L. The script will run as normal and terminate, but the operating system will perceive that the CTRL and SHIFT keys remain physically pressed by the user. This means that if you were to start typing again, every key pressed, such as an I, would be perceived by the operating system as a CTRL+SHIFT+I, clicking on an icon would be perceived as a CTRL+SHIFT+Click. The only way to alleviate this problem is by pressing and releasing each of the modifier keys (CTRL and SHIFT in this example) one by one to release their state before beginning to type or click again. This issue does not appear to interfere with the normal running of the script, but only after the script has terminated and control is returned to the user.

I have turned off all Accessibility Options in the Control Panel as to rule out Sticky Keys and the such. I will hazard a guess that there may be some conflict between the Logitech keyboard drivers and AutoIt, but that is only my inexperienced, stabbing into the wind guess.

System Specs: Windows XP SP3, Dell Optiplex 755, Logitech MX 3200 Keyboard with Set Point 4.60.122

Any assistance with this issue would be greatly appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...