Nine Posted January 3 Share Posted January 3 Yes, just found the problem. When using Send command, there is no identified device (which make sense). So I need to think how to react in such a case, give me sometimes to figure it out. Thanks for finding the issue. I will get back to you shortly... “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...
Nine Posted January 3 Share Posted January 3 I think the easiest way would be to redirect the hotkey to the first keyboard, which should not be too restrictive. At least it is a straightforward patch to allow Send command to work... “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...
Nine Posted January 3 Share Posted January 3 New version available on UDF thread. “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...
mike1950r Posted January 3 Author Share Posted January 3 1 hour ago, Nine said: New version available on UDF thread. thanks lot, will check it out. cheers mike Link to comment Share on other sites More sharing options...
mike1950r Posted January 5 Author Share Posted January 5 (edited) Hi again, I've tested the new build, but unfortunately is does not react on any keystroke. The older version atleast reacted on "REAL" keyboard keystroke and not on send-messages. But the new build reacts on nothing. It seems that after this function nothing is proceeded anymore, waiting for ever. (perhaps the While/WEnd loop ?) Thanks for assistance Cheers mike Edited January 6 by mike1950r Link to comment Share on other sites More sharing options...
Nine Posted January 5 Share Posted January 5 (edited) All works for me so you will need to provide something more substantial for me to further investigate... here my result from your keys : Quote test ^!{ESC} test !{ESC} test {DEL} test {F1} test {END} test !a ps. make sure you dont have any residue of your attempts running around (reboot PC or use _Singleton) Edited January 6 by Nine “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...
mike1950r Posted January 6 Author Share Posted January 6 (edited) Hi, there is nothing special: I just replace my old Hotkeyset Function with the your function. Cheers mike Edited January 6 by mike1950r Link to comment Share on other sites More sharing options...
mike1950r Posted January 6 Author Share Posted January 6 (edited) Hi again, I fear that it's just too much effort. I have no problems with "hotkeyset", but i have problems how @hotkeypressed is handled. In fact I'm just searching for a feature, that waits until keystroke is released, when it receives a keystroke. So it will not always report keystrokes while key is pressed down long time. This should work for single keystrokes as well as for keystroke-combinations. Cheers mike Edited January 6 by mike1950r Link to comment Share on other sites More sharing options...
Nine Posted January 6 Share Posted January 6 Unless you can post a full runable script that shows the problem, I am afraid I won't be able to help you anymore. As all my tests run successfully (even compiled as CUI). 54 minutes ago, mike1950r said: I fear that it's just too much effort. Sorry to hear you giving up easily like that. Good luck anyway. “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...
mike1950r Posted January 19 Author Share Posted January 19 (edited) On 1/6/2024 at 2:11 PM, Nine said: Unless you can post a full runable script that shows the problem, I am afraid I won't be able to help you anymore. As all my tests run successfully (even compiled as CUI). Sorry to hear you giving up easily like that. Good luck anyway. Hi Nine, no I do not give up. I just cannot find a solution for my problem. Here is a script: #include <MsgBoxConstants.au3> HotKeySet("{ESC}", "HotKeyPressed") HotKeySet("+!d", "HotKeyPressed") ; Shift-Alt-d While 1 Sleep(100) WEnd Func HotKeyPressed() Switch @HotKeyPressed ; The last hotkey pressed. Case "{ESC}" ; String is the {ESC} hotkey. Exit Case "+!d" ; String is the Shift-Alt-d hotkey. MsgBox($MB_SYSTEMMODAL, "", "This is a message.") EndSwitch EndFunc ;==>HotKeyPressed If I press (SHIFT+Alternate+d) a little bit longer, the message box comes up one time after the other (multiple times) until the pipe is empty. I just want the message box come up ONCE no matter how long I have pressed (SHIFT+Alternate+d) Thanks for assistance. Cheers mike Edited January 19 by mike1950r Link to comment Share on other sites More sharing options...
Andreik Posted January 19 Share Posted January 19 #include <MsgBoxConstants.au3> HotKeySet("{ESC}", "HotKeyPressed") HotKeySet("+!d", "HotKeyPressed") ; Shift-Alt-d While 1 Sleep(100) WEnd Func HotKeyPressed() Switch @HotKeyPressed ; The last hotkey pressed. Case "{ESC}" ; String is the {ESC} hotkey. Exit Case "+!d" ; String is the Shift-Alt-d hotkey. HotKeySet("+!d") MsgBox($MB_SYSTEMMODAL, "", "This is a message.") HotKeySet("+!d", "HotKeyPressed") EndSwitch EndFunc ;==>HotKeyPressed mike1950r 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
mike1950r Posted January 19 Author Share Posted January 19 Hi Andreik, thanks for the tip. I will check this out in my script. Cheers mike Link to comment Share on other sites More sharing options...
mike1950r Posted January 19 Author Share Posted January 19 Hi Andreik, it works fine in the script above. But it does not work in my script with a switch with 80 cases. I have no idea, what can be the solution. Cheers mike Link to comment Share on other sites More sharing options...
Andreik Posted January 19 Share Posted January 19 (edited) As Nine said, none really knows what are you doing. Post your full script or stop asking people to guess what is the problem in a script that we never saw. Edited January 19 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
mike1950r Posted January 19 Author Share Posted January 19 (edited) Andreik, I cannot post a script, which is complex like a program, which needs a personal large library of all the function I wrote. But it makes still sense to ask for known limitations working in hotkeypressed switch. I had got limitation of functions with complex loops inside of hotkeypressed function. I had to write them less complex, to get the functions working in the switch. I can try to exclude cases in hotkeypressed switch for testing, and find out which case(s) cause the problem. Atleast this code of you works fine to avoid problems, when pressing the key longer. Case "+!d" ; String is the Shift-Alt-d hotkey. HotKeySet("+!d") MsgBox($MB_SYSTEMMODAL, "", "This is a message.") HotKeySet("+!d", "HotKeyPressed") I will find out which cases(s) of mine cause the problem, that this code above has no effect anymore in my switch. Thanks for your assistance. Cheers mike Edited January 19 by mike1950r Link to comment Share on other sites More sharing options...
Andreik Posted January 19 Share Posted January 19 Ok but you understand that even if we want to help you we are just guessing. Hope you'll find a solution. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
mike1950r Posted January 20 Author Share Posted January 20 (edited) 18 hours ago, Andreik said: Ok but you understand that even if we want to help you we are just guessing. Hope you'll find a solution. Hi again, OK found a solution. In fact in my Hotkeypressed function there was a lot of stuff before the hotkeypressed switch. I have changed this in front of the function. HotKeySetUndo() $idMenuItem = @HotKeyPressed HotKeySet() Then the whole stuff came, which was in front before, And then afterwards I handled the $idMenuItem variable. Switch $idMenuItem Case "^{TAB}" Function() Case "^!{ESC}" Function2() Case "+!{ESC}" Function3() Case "!{Esc}" etc. ... EndSwitch Now this works perfectly. Thanks for your help. Cheers mike Edited January 20 by mike1950r 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