Paff Posted October 18, 2008 Share Posted October 18, 2008 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! Link to comment Share on other sites More sharing options...
oMBRa Posted October 18, 2008 Share Posted October 18, 2008 http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx Link to comment Share on other sites More sharing options...
Paff Posted October 19, 2008 Author Share Posted October 19, 2008 http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspxyep, I know this I dont use only 'send' method from AutoIt library. The problem is: CTRL key is down when script is finished BUT when script is starting by keystroke - ctrl + .... (not by double click on vbs file or something like that).Is it clear? My english is not good Thanks anyway. Link to comment Share on other sites More sharing options...
oMBRa Posted October 19, 2008 Share Posted October 19, 2008 I still dont understand Link to comment Share on other sites More sharing options...
Paff Posted October 19, 2008 Author Share Posted October 19, 2008 I still dont understandok, 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 - 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 featureautoit remember keys position before script start? is there someone who was the same symptom? Link to comment Share on other sites More sharing options...
wraithdu Posted October 19, 2008 Share Posted October 19, 2008 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 More sharing options...
badgeguy Posted November 17, 2008 Share Posted November 17, 2008 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.122Any assistance with this issue would be greatly appreciated. Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 17, 2008 Share Posted November 17, 2008 This is known to happen with AutoIt scripts a lot. Many solutions have been suggested. It just seems to be an automation problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now