t.s.lim Posted May 18, 2005 Report Share Posted May 18, 2005 Hi, I would like to suggest such that TEXT TYPE command can be specific about who is the receiver. I.e. when "Text Type"ing keystroke, we can specify in the command who will be the prefered receiver. It can be a running window/program or O/S itself. Among the benefit of this "receiver specific" are 1) I can overwrite window hotkey (Please see my the other thread "Can ME overwrite WinXp Shortcut key") 2) If more than one running programs are competing for the same keystrokes, I can use ME to decide who will receive it. t.s.lim Quote Link to comment Share on other sites More sharing options...
floyd Posted May 18, 2005 Report Share Posted May 18, 2005 You can target the output of the Text Type command for those window objects that can be captured and that will also accept text. You can also send mouse clicks to these objects. Quote Link to comment Share on other sites More sharing options...
kevin Posted May 19, 2005 Report Share Posted May 19, 2005 Try Windows Controls and the "Send Text to Control" option in the Text Type command. As Floyd points out, this will work if the applications are written to support Window Controls. Quote Link to comment Share on other sites More sharing options...
t.s.lim Posted May 20, 2005 Author Report Share Posted May 20, 2005 Hi, What about application that does not has windows controls? For example if I were to text type to a console program that runs from a DOS box. Quote Link to comment Share on other sites More sharing options...
kevin Posted May 20, 2005 Report Share Posted May 20, 2005 Then you have to give that application focus and Text Type into it. Windows controls which programs receive keystrokes and mouse events. The choices are either the program with focus or, if supported, via Windows Controls. Quote Link to comment Share on other sites More sharing options...
t.s.lim Posted May 20, 2005 Author Report Share Posted May 20, 2005 Hi, But window won't give keystorke to running program (with focus) if the keystroke is a win hotkey. So, ME should decide who to give (in term of window or program) not Windows. t.s.lim Quote Link to comment Share on other sites More sharing options...
kevin Posted May 20, 2005 Report Share Posted May 20, 2005 Windows sets the rules about how keystrokes are handled. What Windows wants, Windows gets. Macro Express interfaces with Windows using the Windows Hooks. When a key is pressed, it is passed to Windows, passed to Macro Express, Macro Express passes it back to Windows and Windows passes it to the application. Windows processes certain keystrokes without sending them through the 'hook chain'. If Windows does not send it to Macro Express or acts on it before sending it to Macro Express, then Macro Express cannot intercept it. Certain key combinations that involve the Win key do this. Quote Link to comment Share on other sites More sharing options...
t.s.lim Posted May 20, 2005 Author Report Share Posted May 20, 2005 Hi, But for the case of Alt-Space, as discussed in the other thread, it obviously is something window wants, but ME gets it (if I set the ME macro hotkey as Alt-Space). I do not know how true is this: "When a key is pressed, it is passed to Windows, passed to Macro Express, Macro Express passes it back to Windows and Windows passes it to the application" or should there be an exception, because Alt-Space suppose to be something Windows wants, but it ends up in ME. So if what you quote: "What Windows wants, Windows gets" is always true, than a ME macro with a hotkey like Alt+Space will never get activated I am not clear with the inner work of "Windows Hooks". But if a ME macro works with a hotkey Alt-Space there could be only 2 possibilities: 1) ME sieze it from Windows 2) Window wants it (as a windows hotkey)but will give to any application who wants if there is one. But from my test, if there is a ME macro with Alt-Space as its hotkey, the macro is activated instead of the "Properties menu" for active application being pop up. That shows either case 1) or 2) is ture. But then when I TEXT TYPE again Alt-Space from within the same macro, the "Properties menu" is up for active application. This time window takes it. I am really at a loss...?? Quote Link to comment Share on other sites More sharing options...
kevin Posted May 20, 2005 Report Share Posted May 20, 2005 The Alt+Space works because Macro Express, when it sees Alt+Space, can send something different to the remainder of the hook chain. Win+E does not work because Windows does not send Win+E to Macro Express. I do not know how true is this:"When a key is pressed, it is passed to Windows, passed to Macro Express, Macro Express passes it back to Windows and Windows passes it to the application" or should there be an exception, because Alt-Space suppose to be something Windows wants, but it ends up in ME. So if what you quote: "What Windows wants, Windows gets" is always true, than a ME macro with a hotkey like Alt+Space will never get activated. Note that Windows has two opportunities to act on a keystroke. Before it is sent down the hook chain or after. Windows reacts to Alt+Space after the hook chain but it reacts to Win+E before the hook chain. Quote Link to comment Share on other sites More sharing options...
t.s.lim Posted May 22, 2005 Author Report Share Posted May 22, 2005 Hi kevin, Thanks for the explanation, I now know the work of this hooking process and I can now reason out why it is impossible to TEST TYPE a Win Hotkey to an application who don't support window controls and does not allow user defined hotkey on it own. 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.