jdegraff Posted September 30 Share Posted September 30 (edited) I'm using AutoItX 3.3.16.1 from python 3.11 to perform a sequence of actions from my browser (Brave). Specifically: 1. set focus to the address bar 2. select all 3. copy to clipboard To account for any lagging in the browser I put a half second delay between steps so I end up with autoit.aut.send('!d') # focus to address autoit.aut.sleep(500) autoit.aut.send('^a') # select entire address autoit.aut.sleep(500) autoit.aut.send('^c') # copy address Following that I take the address from the clipboard, massage it, close the current tab, then browse to the massaged address autoit.aut.send('^w') webbrowser.open(url) I find that occasionally the CTRL key gets stuck in that if I use the mouse wheel to scroll I instead get zoom in/out as if I was doing CTRL+SCROLL. If I press CTRL manually I can then scroll. 1. is this a bug in autoitx? 2. is there a way, from within autoitx, to undo the "pressed" status of the CTRL key? Edited September 30 by jdegraff added version info Link to comment Share on other sites More sharing options...
Nine Posted September 30 Share Posted September 30 https://www.autoitscript.com/wiki/FAQ#Why_does_the_Ctrl_key_get_stuck_down_after_I_run_my_script? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
jdegraff Posted October 1 Author Share Posted October 1 The code in the link does not apply since I am using AutoItX which uses a different syntax. The suggestion that appeared below which I coded as autoit.aut.ControlSend("", "", "", "text", 0) had no effect. The CTRL key was still stuck. Link to comment Share on other sites More sharing options...
Nine Posted October 1 Share Posted October 1 Try this sequence : Send("{CTRLDOWN}") Send("a") Send("{CTRLUP}") pixelsearch 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
pixelsearch Posted October 1 Share Posted October 1 (edited) @Nine your solution seems to works fine with AutoIt, I hope it will be same for OP with AutoItX If everybody confirms there are no more "sticky keys" issue with your code, then why not updating the wiki link you indicated in your 1st post and add your solution to it ? I just spent 10 minutes trying to break your code, with this script where I send Ctrl+a, but I couldn't break it (i.e. no sticky keys appeared) 1) What's actually in the script, that works (no sticky key, using a simplified version of the wiki code) While _IsPressed("11") ; Ctrl = 11 . Important While to avoid a possible "sticky key" issue before Send("^a") Sleep(10) WEnd Send("^a") 2) Your solution, that works for me (no sticky keys) : comment out the 4 lines code above and add this : Send("{CTRLDOWN}") Send("a") Send("{CTRLUP}") 3) Let's not be too greedy, because this 1 line code won't solve anything (sticky key appears randomly) : Send("{CTRLDOWN}a{CTRLUP}") ; sticky key appears randomly I wish everybody reading this gives a try to your code and report if they don't get the sticky key issue anymore. Edited October 1 by pixelsearch typo Link to comment Share on other sites More sharing options...
Nine Posted October 2 Share Posted October 2 16 hours ago, pixelsearch said: why not updating the wiki link you indicated in your 1st post and add your solution to it ? Will do if OP can confirm that it is also working with AutoItX “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
jdegraff Posted October 2 Author Share Posted October 2 (edited) The three line method works perfectly in AutoItX. Thanks. Edited October 2 by jdegraff typo 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