Alexis Posted June 29, 2021 Report Share Posted June 29, 2021 Hey everyone, I'm using Q-Dir as my to go File Explorer programm. For some odd reason MEX cannot send keystrokes/hotkeys to (via Text Type) Q-Dir. They only seem to work sporadically, partially or not at all. I tried to use different scopes (Global, Program/window specific). Even single and basic Hotkeys like CTRL+1 (through 4) are 80% of the time not being registered. I even played around with Keystroke Speeds. Are some programs sometimes just not able to recieve Hotkeys via MEX? Quote Link to comment Share on other sites More sharing options...
Cory Posted June 29, 2021 Report Share Posted June 29, 2021 I don't have many ideas for you or any experience with this program. Some random thoughts. Make sure your hotkeys are not reserved in the program in any mode. Make sure your window is focused (active). Use the debugger. I would specifically look at whether the macro activated. You can tell the by the last run time in Macro Explorer. Just becasue nothing appears to happen doesn't mean the macro didn't activate. Try in safe mode. Might be some other utility messing with you. Quote Link to comment Share on other sites More sharing options...
acantor Posted June 29, 2021 Report Share Posted June 29, 2021 Quote Are some programs sometimes just not able to recieve Hotkeys via MEX? There are a few applications that MEP can't see. But if your macros work sporadically, that suggests to me that something else is wrong. Add an instruction to your macro to pop a message box as a way to confirm your macros are getting activated. MessageBox: The hotkey was recognized! Some programs, especially when running under Windows 10, have trouble keeping focus. Does it help if you click in the Q-Dir window before you activate your hotkey? Quote Link to comment Share on other sites More sharing options...
rberq Posted June 29, 2021 Report Share Posted June 29, 2021 2 hours ago, acantor said: Add an instruction to your macro to pop a message box as a way to confirm your macros are getting activated. MessageBox: The hotkey was recognized! You can insert message boxes like this at many critical points in your macro, to determine how far the macro has progressed. Within the message box you can also display the values of variables, if you are wondering why IF conditions are not being met, and so on. Once debugging is complete, remove the message box commands -- or, better, just inactivate the commands so you can re-activate them six months from now when something changes and the macro suddenly stops working. 😉 Quote Link to comment Share on other sites More sharing options...
acantor Posted June 29, 2021 Report Share Posted June 29, 2021 57 minutes ago, rberq said: Once debugging is complete, remove the message box commands -- or, better, just inactivate the commands so you can re-activate them six months from now when something changes and the macro suddenly stops working. An accurate description of the life of a person who likes to script macros! Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 Thanks to everybody so far. The macro gets properly activated. Textboxes get displayed and also i see it in the Macro Explorer in the column "Last Run Time". I don´t think that the hotkeys are blocked by another program. For example CTRL + 1 works always if pressed manually but only 10% if Text Typed by MEX. It´s like this nice alternative to Windows Explorer kind of ignores actions by MEX. Interestingly other keycommands like CTRL TAB for changing Tabs are recognized 100% of the time. If you browse like i a lot within folders you may check out this 4 Window File Explorer and also this odd problem 😉 . The keycommands CTRL + 1-4 are used for adressing the four Explorerwindows. http://www.softwareok.com/?seite=Freeware/Q-Dir Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 Do you have this checkbox unchecked? "Wait for the HotKey to be released before activating." If yes, put a tick in the checkbox, save the macro, and try again. Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 Yes, all my macros have this box checked! Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 Let's see one of your scripts. Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 I fear there is not much to see. I also experimented with Delay Times and various keystrokespeeds. I also divided the CTRL + 1 command into three different codelines. No difference! <TEXT TYPE Action="0" Text="<CTRLD>1<CTRLU>"/> Can anyone reproduce the problem? Quote Link to comment Share on other sites More sharing options...
rberq Posted June 30, 2021 Report Share Posted June 30, 2021 I have had macro typing fail intermittently if the keystrokes are entered too fast. Most of my macros have this standard command at the beginning: Keystroke Speed: 30 milliseconds That's usually fast enough to keep me from fidgeting, but slow enough so the application is not overwhelmed. Edit: Oops! We posted at the same time. I see you have already tried that. Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 Your macro, activated by Ctrl + 1, sends Ctrl + 1 to the application? If so, that's probably the problem. Try a totally different hotkey. Quote Link to comment Share on other sites More sharing options...
rberq Posted June 30, 2021 Report Share Posted June 30, 2021 9 minutes ago, Alexis said: <TEXT TYPE Action="0" Text="<CTRLD>1<CTRLU>"/> Silly question, maybe --- do you by chance have some other macro triggered by <CTRLD>1<CTRLU> ??? Edit: Another simultaneous posting. acantor beat me this time.😐 Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 The macro is triggered by ALT + 1. CTRL + 1 is the Output of the macro. It gets activated every time ALT + 1 is pressed. No other macro gets activated. Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 1. Try substituting this: <TEXT TYPE Action="0" Text="<CTRL>1"/> 2. What happens if you change the activation to something that doesn't involve a modifier key, e.g., F11, F12, Numpad *, etc. Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 Thanks acantor. Both ideas make no difference. Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 What happens if you manually click somewhere inside the application window before activating the hotkey? Quote Link to comment Share on other sites More sharing options...
Alexis Posted June 30, 2021 Author Report Share Posted June 30, 2021 I always click inside Q-Dir before pressing ALT + 1 to make sure Q-Dir.exe is active. As the macro has Q-Dir Scope. Quote Link to comment Share on other sites More sharing options...
acantor Posted June 30, 2021 Report Share Posted June 30, 2021 So... you manually click inside Q-DIr before you press the hotkey, and sometimes it works, sometimes it doesn't. Any patterns you can discern to the failures, e.g., the hotkey never works the first time you press it, but it always works the second time. If this is the case, not sure what is going on, although it might have to do with a component of Q-Dir stealing focus. Take a screen shot of Q-Dir window, and post it here! Quote Link to comment Share on other sites More sharing options...
Alexis Posted July 1, 2021 Author Report Share Posted July 1, 2021 Well let´s say i make sure that the Q-Dir Window is active as the macro is scope specific. I can not recognize any pattern. Maybe one could install this tiny tool and try it himself. Just an idea. 😉 You may fall in love with it like i did. Q-Dir consist out of 5 areas. On the left the navigation pane. On the right from this four independent folders which even can have different Tabs which i love. CTRL + 1 should always select the first (yellow) folder. Another nice feature is that you can define different formats for filetypes. You see the different colours for the filenames in Folderwindow 1 (yellow) Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 1, 2021 Report Share Posted July 1, 2021 18 hours ago, Alexis said: The macro is triggered by ALT + 1. CTRL + 1 is the Output of the macro. It gets activated every time ALT + 1 is pressed. No other macro gets activated. Alexis, More detail needed! Please post your macro and describe the startup state required and what it is supposed to do when you activate it with Alt + 1 if it's not obvious from your commented script. Meanwhile, I've installed the program (64-bit, as Admin), but using the following minimalist macro, I could not reproduce the issue during a dozen or so runs. // Attempting to reproduce problem described at https://pgmacros.invisionzone.com/topic/8883-mex-pro-4-and-q-dir-hotkey-problems/ // Ensure Q-Dir has focus before activating this macro with ALT + 1 Delay: 0.1 seconds Text Box Display: Temp Text Type (Simulate Keystrokes): <CONTROL>1 // Now added a long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1. Delay: 0.5 seconds // Long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1. Text Box Display: Temp <COMMENT Value="Attempting to reproduce problem described at\r\nhttps://pgmacros.invisionzone.com/topic/8883-mex-pro-4-and-q-dir-hotkey-problems/"/> <COMMENT Value="Ensure Q-Dir has focus before activating this macro with ALT + 1"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT BOX DISPLAY Title="Temp" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 The macro has been activated by Alt+1\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<CONTROL>1"/> <COMMENT Value="Now added a long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1."/> <DELAY Flags="\x01" Time="0.5" _COMMENT="Long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1."/> <TEXT BOX DISPLAY Title="Temp" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 The macro typed CTRL + 1. Now what?\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> BTW, I'm always rather careful about using Alt in my activation keys, as I've occasionally had quirky results, particularly under Win 10. And I assume you've tried varying delays after the crucial TextType, and also Wait For Text Playback? To make further progress we need to be singing from exactly the same hymn book, as the devil is usually in the details! Terry Thursday 1 July 2021, 0907 Quote Link to comment Share on other sites More sharing options...
Alexis Posted July 1, 2021 Author Report Share Posted July 1, 2021 First of all 1000 thanks for trying to reproduce the problem! 😃 The only two lines of code are: <KEYSTROKE SPEED Delay="100"/> <TEXT TYPE Action="0" Text="<CTRLD>1<CTRLU>"/> Should i export the macro and upload it here? Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 1, 2021 Report Share Posted July 1, 2021 And your reply to the rest of my request? "Please post your macro and describe the startup state required and what it is supposed to do when you activate it with Alt + 1" Also, did you try running mine? EDIT: Meanwhile, as far as I can tell after some trial and error, the application shortcuts CTRL + 1, CTRL + 2, CTRL + 3, and CTRL + 4 appear to successively select each of the four (default) panes. Is that what you want it to do? If so, I was able to reproduce your problem. Thursday 1 July 2021, 1105 Quote Link to comment Share on other sites More sharing options...
Alexis Posted July 1, 2021 Author Report Share Posted July 1, 2021 Exactly, CTRL 1 to 4 are activating the four panes. This is what the macro should do. Simply activate Pane 1. I am really happy that you can reproduce the problem because i never experienced that it made any difference if i or MEX is "typing" the keys. I mean thats the beauty about MEX, right? 😃 Your macro made no difference for me. Did it work for you? Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 1, 2021 Report Share Posted July 1, 2021 No, mine behaved the same. (Now that I know what it's supposed to do!) There's definitely something strange going on with those hotkeys Ctrl + 1/2/3/4. BTW, I couldn't find them documented? At least, not in the list I've shown below. FWIW I've emailed the author. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.