ztoddw Posted January 11, 2020 Share Posted January 11, 2020 The AutoIT help says : "When you set a hotkey, AutoIt captures the key-press and does not pass it on to the active application, with one exception: the Lock keys (NumLock, CapsLock, and ScrollLock) still toggle their respective state!" But this is not true for me. Here is my code : ; Script Start - Add your code below here HotKeySet("!q", "Terminate") HotKeySet("!s", "typeSelect") ; Shift-Alt-d While 1 Sleep(100) WEnd Func Terminate() Exit EndFunc ;==>Terminate Func typeSelect() Send("select * from ") EndFunc ;==>ShowMessage When I press Alt-S, it seems to first be sent to my active editor program, activating the 'Edit' menu, and then it chooses "Copy", then it types "t * from" into the editor. (It's sending "select * from", and the "L" and "E" keys do not map to anything in the menu, so the "c" activates the Copy command- then it types the rest into my editor.) I guess it might be withholding the the S I'm typing while I hold Alt down, but it's not withholding the Alt key. Has anyone run into this before? Maybe Alt is just not a good modifier key for me to use in this case. Link to comment Share on other sites More sharing options...
argumentum Posted January 11, 2020 Share Posted January 11, 2020 (edited) https://www.autoitscript.com/autoit3/docs/functions/HotKeySet.htm is a good read. HotKeySet() returns a value to let you know if it worked, else, choose another combination Edit: got to read some more 😁 I guess that the GUI will take the keyboard first so your key combination was used in the GUI. Not all GUIs behave the same. Edited January 11, 2020 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 11, 2020 Moderators Share Posted January 11, 2020 (edited) Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Edited January 11, 2020 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Nine Posted January 11, 2020 Share Posted January 11, 2020 Try this instead : #include <Misc.au3> HotKeySet("!q", "Terminate") HotKeySet("!s", "typeSelect") While 1 Sleep(100) WEnd Func Terminate() Exit EndFunc ;==>Terminate Func typeSelect() While _IsPressed ("12") Sleep (50) WEnd Send("select * from ") EndFunc ztoddw 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...
ztoddw Posted January 13, 2020 Author Share Posted January 13, 2020 Hmm, not sure how this would've gotten into the Developer General Discussion area-- I posted it in the AutoIT help section. But thanks y'all! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2020 Developers Share Posted January 13, 2020 13 minutes ago, ztoddw said: I posted it in the AutoIT help section No you did not! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ztoddw Posted January 13, 2020 Author Share Posted January 13, 2020 Well you're in a real contentious mood today, aren't ya. I posted it in the AutoIT help section. If it ended up in a different section, maybe there's an issue with the site. But I think JLogan3o13 was probably just mistaken when thought he saw it in the Developer General Discussion area. It would be better if you did not directly contradict your forum users like that, please. Give us the benefit of the doubt, that perhaps we might actually be in a better position to know what we did, better than you do. I'm not trying to personally attack you or anyone. But it feels like you personally attacked me, so I'm getting defensive. You can choose not to believe me- fine. But please don't just flat out contradict me about something that I'm actually in a better position to know about. You need to consider that the moderators and developers on this site are just as capable of mistakes or having wrong information as we are. Again, thanks for the help everyone. seadoggie01, Musashi and Earthshine 3 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 13, 2020 Moderators Share Posted January 13, 2020 6 minutes ago, ztoddw said: I posted it in the AutoIT help section. If it ended up in a different section, maybe there's an issue with the site. But I think JLogan3o13 was probably just mistaken when thought he saw it in the Developer General Discussion area. The functionality of moving a thread from the DEV forum to GH&S is an automated process for which a Moderator simply clicks a button. The thread won't move if it isn't in the DEV forum, so you are incorrect. Quote It would be better if you did not directly contradict your forum users like that, please. Give us the benefit of the doubt, that perhaps we might actually be in a better position to know what we did, better than you do. Perhaps take your own advice and understand that someone who daily works behind the scenes of this forum just might know a bit more about the inner workings of it than you, and might have had a reason for responding the way they did. Or, even better, don't waste time getting all worked up trying to read tone from an online post and just move on. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2020 Developers Share Posted January 13, 2020 30 minutes ago, ztoddw said: 'm not trying to personally attack you or anyone. But it feels like you personally attacked me, so I'm getting defensive. You can choose not to believe me- fine. But please don't just flat out contradict me about something that I'm actually in a better position to know about. You need to consider that the moderators and developers on this site are just as capable of mistakes or having wrong information as we are. I surely know we are human too and we/I do make mistakes. My post was both tongue in cheek and meant to tell you that you are simply wrong as this move option ONLY shows when the thread is located in that forum as I configured it.... so get of your high horse and just smile when you get these type replies unless there is real important things happening. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ztoddw Posted January 15, 2020 Author Share Posted January 15, 2020 On 1/13/2020 at 1:26 PM, Jos said: this move option ONLY shows when the thread is located in that forum as I configured it That's how it was designed -- but it's always possible that something could go wrong in the system. I'm telling you what I remember doing, and you refuse to believe me. Fine. You're essentially telling there's no way I could be remembering correctly, because you're certain that your system works perfectly. Then you tell me to get off my high horse. Thank you for that. </sarcasm> I was hoping to get the point across that there's a better way to respond to people than to just flat-out contradict them, and to give no reason for doing so. That is seen as contentious- and your little winky emoticon doesn't do anything to help. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 15, 2020 Developers Share Posted January 15, 2020 1 minute ago, ztoddw said: That's how it was designed -- but it's always possible that something could go wrong in the system. Seriously ? Oh well, whatever if that makes you happy. 2 minutes ago, ztoddw said: I was hoping to get the point across that there's a better way to respond to people than to just flat-out contradict them, and to give no reason for doing so. That is seen as contentious- and your little winky emoticon doesn't do anything to help. Just look in the mirror and read this out load to the person you see! ;) ( yes put there deliberately to tell you to take this less serious which I know if not going to happen in this case) This is the last energy I will spend on you and your total state of denial. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 15, 2020 Developers Share Posted January 15, 2020 1 minute ago, ztoddw said: That's how it was designed -- but it's always possible that something could go wrong in the system. Seriously ? Oh well, whatever if that makes you happy. 2 minutes ago, ztoddw said: I was hoping to get the point across that there's a better way to respond to people than to just flat-out contradict them, and to give no reason for doing so. That is seen as contentious- and your little winky emoticon doesn't do anything to help. Just look in the mirror and read this out load to the person you see! ;) ( yes put there deliberately to tell you to take this less serious which I know if not going to happen in this case) This is the last energy I will spend on you and your total state of denial. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 15, 2020 Moderators Share Posted January 15, 2020 (edited) 13 minutes ago, ztoddw said: That's how it was designed -- but it's always possible that something could go wrong in the system. I'm telling you what I remember doing, and you refuse to believe me. Fine. You're essentially telling there's no way I could be remembering correctly, because you're certain that your system works perfectly. Then you tell me to get off my high horse. Thank you for that. </sarcasm> I was hoping to get the point across that there's a better way to respond to people than to just flat-out contradict them, and to give no reason for doing so. That is seen as contentious- and your little winky emoticon doesn't do anything to help. You have two options at this point. You can get over the complaining about something that you are clearly wrong about, such as what forum you posted in, and which really doesn't matter, and you can get on with the business of asking your question. Or you can continue to beat the proverbial dead horse, and the thread can be closed. At this point I am fine either way, pick one. Edited January 15, 2020 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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