
Quote from luishp on November 12, 2021, 8:00 amPS I have NO clue what I'm doing to post in two font sizes...
Whenever you paste copied content try using Ctrl-Shift-V instead of Ctrl-V :)
PS I have NO clue what I'm doing to post in two font sizes...
Whenever you paste copied content try using Ctrl-Shift-V instead of Ctrl-V :)

Quote from Wrangler on November 12, 2021, 10:48 pmGreat job on the Cliptricks plugin. This is one that everybody should have in their toolbox. Priced right and simple to use. Congrats Saeem!
Great job on the Cliptricks plugin. This is one that everybody should have in their toolbox. Priced right and simple to use. Congrats Saeem!

Quote from rcohen on November 12, 2021, 11:25 pmThanks for the good word @wrangler. Zaeem did a great job with it for sure. I'm already putting it to work ;-)
And thanks for your support. It's greatly appreciated.
Thanks for the good word @wrangler. Zaeem did a great job with it for sure. I'm already putting it to work ;-)
And thanks for your support. It's greatly appreciated.

Quote from rcohen on November 13, 2021, 5:24 am@Vadim,
If I can bother you once again. Excuse my ignorance with things like window handles and ID's. But I'm trying to use the WinHandle (which I can get easily with the setup you offered) and use it to address the window in a sendkeys command.
I use this to get the title...
zmGetForegroundWindow "[TopWin]"
zmGetWindowTitle "[TopWin]" "" "[TitleNew]"
If "[TitleNew]" "<>" "[TitleOld]"
SetVar "[Title]" "[TitleNew]"
SetVar "[TitleOld]" "[TitleNew]"
EndIFI added the following to get the winhandle
zmGetWindowHandle "[Title]" "[WinHand]"
and then I try to address the window using
:Paste
SendKeys "[WinHand]" "{CtrlDn}V{CtrlUp}"
ReturnThat is a subroutine because I use NeoBookKB plugin to set a global hotkey to trigger it.
I get an error "can't find window" or some such. So I believe it's not the window handle that sendkeys needs?
Thank you in advance for some clarification.
I would like to thank Peter Pavlov for his amazing plugin. How did I miss this one? Does he have a web site? I'd like to thank him personally.
If I can bother you once again. Excuse my ignorance with things like window handles and ID's. But I'm trying to use the WinHandle (which I can get easily with the setup you offered) and use it to address the window in a sendkeys command.
I use this to get the title...
zmGetForegroundWindow "[TopWin]"
zmGetWindowTitle "[TopWin]" "" "[TitleNew]"
If "[TitleNew]" "<>" "[TitleOld]"
SetVar "[Title]" "[TitleNew]"
SetVar "[TitleOld]" "[TitleNew]"
EndIF
I added the following to get the winhandle
zmGetWindowHandle "[Title]" "[WinHand]"
and then I try to address the window using
:Paste
SendKeys "[WinHand]" "{CtrlDn}V{CtrlUp}"
Return
That is a subroutine because I use NeoBookKB plugin to set a global hotkey to trigger it.
I get an error "can't find window" or some such. So I believe it's not the window handle that sendkeys needs?
Thank you in advance for some clarification.
I would like to thank Peter Pavlov for his amazing plugin. How did I miss this one? Does he have a web site? I'd like to thank him personally.
Quote from mishem on November 13, 2021, 10:59 am@rcohen
So I believe it's not the window handle that sendkeys needs?
No. This command needs an application ID .
Perform the action:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
And look up the [ID] variable in the debugger.
This is the variable to be sent to the SendKeys command.
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"Another thing to keep in mind is that if you have a keyboard layout that is NOT English, the keyboard shortcuts will not be correct. And most importantly, for example in this case, the {CtrlDn} key stays pressed when the application crashes. (if that happens).
So I believe it's not the window handle that sendkeys needs?
No. This command needs an application ID .
Perform the action:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
And look up the [ID] variable in the debugger.
This is the variable to be sent to the SendKeys command.
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"
Another thing to keep in mind is that if you have a keyboard layout that is NOT English, the keyboard shortcuts will not be correct. And most importantly, for example in this case, the {CtrlDn} key stays pressed when the application crashes. (if that happens).
Quote from mishem on November 13, 2021, 11:01 amI would like to thank Peter Pavlov for his amazing plugin. How did I miss this one? Does he have a web site? I'd like to thank him personally.
For all we know, he's dead.
I would like to thank Peter Pavlov for his amazing plugin. How did I miss this one? Does he have a web site? I'd like to thank him personally.
For all we know, he's dead.

Quote from mishem on November 13, 2021, 11:15 am
Another thing to keep in mind is that if you have a keyboard layout that is NOT English,
For such situations Peter has written another plugin - zmKeyboard, which can detect and change the current keyboard layout. For our systems, with the Russian language, we have to execute such code:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
zmKB_GetLayout "[Result]"
If "[Result]" "<>" "2"
zmKB_ChangeLayout "2"
EndIf
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"
zmKB_ChangeLayout "[Result]"
Performing the action:
zmKB_ChangeLayout "[Result]"
Returns the keyboard layout back.
But I do not know how it will work on other systems, such as Spain, France, etc., as the plugin is defined only Russian and English keyboard layout.
I'm attaching the zmKeyboard plugin just in case.
Another thing to keep in mind is that if you have a keyboard layout that is NOT English,
For such situations Peter has written another plugin - zmKeyboard, which can detect and change the current keyboard layout. For our systems, with the Russian language, we have to execute such code:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
zmKB_GetLayout "[Result]"
If "[Result]" "<>" "2"
zmKB_ChangeLayout "2"
EndIf
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"
zmKB_ChangeLayout "[Result]"
Performing the action:
zmKB_ChangeLayout "[Result]"
Returns the keyboard layout back.
But I do not know how it will work on other systems, such as Spain, France, etc., as the plugin is defined only Russian and English keyboard layout.
I'm attaching the zmKeyboard plugin just in case.
Uploaded files:
Quote from mishem on November 13, 2021, 11:22 amDoes he have a web site?
And the site is and still is:
http://neobooker.ru/
There you can also find a lot of answers to your questions.
Does he have a web site?
And the site is and still is:
There you can also find a lot of answers to your questions.
Quote from mishem on November 13, 2021, 11:36 amThe above is not the correct code for the zmKeyboard plugin. Haven't used it in a while. The correct way is this:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
zmKB_GetLayout "[Result]"
If "[Result]" "=" "Rus"
zmKB_ChangeLayout "2"
EndIf
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"
If "[Result]" "=" "Rus"
zmKB_ChangeLayout "1"
EndIf
The above is not the correct code for the zmKeyboard plugin. Haven't used it in a while. The correct way is this:
Run "[WindowsDir]notepad.exe" "" "Normal" "" "[ID]"
zmKB_GetLayout "[Result]"
If "[Result]" "=" "Rus"
zmKB_ChangeLayout "2"
EndIf
SendKeys "[ID]" "{CtrlDn}V{CtrlUp}"
If "[Result]" "=" "Rus"
zmKB_ChangeLayout "1"
EndIf

Quote from rcohen on November 13, 2021, 11:17 pm@mishem,
Thank you for all the hard work getting me this info and code.
I won't be engaging the run for the software we need to paste into, thus the need to detect which window is active.
How does one get the correct ID of the window so that I can sendkeys? I'm guessing there is a function for that but I am not sure even what the correct info is called. What is the application ID and how can I retrieve it? I see I can use "application name" also but if there are three windows of notepad open, I need to be sure I'm pointed to the right one ;-)
And for the country code thing, I appreciate that info as well, but my demographic is strictly the US. I have stored the plugin (thank you) and the scripting (the correct one <grin>) here with the plugin.
Thanks again @mishem, much appreciated.
Somehow I posted the above before ready to send... and I can't edit nor delete it... Luis, can you delete it ;-)
Thank you for all the hard work getting me this info and code.
I won't be engaging the run for the software we need to paste into, thus the need to detect which window is active.
How does one get the correct ID of the window so that I can sendkeys? I'm guessing there is a function for that but I am not sure even what the correct info is called. What is the application ID and how can I retrieve it? I see I can use "application name" also but if there are three windows of notepad open, I need to be sure I'm pointed to the right one ;-)
And for the country code thing, I appreciate that info as well, but my demographic is strictly the US. I have stored the plugin (thank you) and the scripting (the correct one <grin>) here with the plugin.
Thanks again @mishem, much appreciated.
Somehow I posted the above before ready to send... and I can't edit nor delete it... Luis, can you delete it ;-)
Quote from mishem on November 14, 2021, 1:13 am@rcohen
Plugins:
zmFunctions
hpwSendKeys
It's a rush job, there could be mistakes.
Hope that helped. :)
Plugins:
zmFunctions
hpwSendKeys
It's a rush job, there could be mistakes.
Hope that helped. :)
Uploaded files:

Quote from rcohen on November 14, 2021, 2:28 am@mishem, thanks a bunch... I'll check it out.
I think however if I can figure out what the native send keys is looking for, that I can use that... but I have no clue how to get the "Application ID" (I don't even know what that is apparently, as I was thinking it was the WinHandle).
Thanks again @mishem. I appreciate the time you're taking with this ;-)
r
@mishem, thanks a bunch... I'll check it out.
I think however if I can figure out what the native send keys is looking for, that I can use that... but I have no clue how to get the "Application ID" (I don't even know what that is apparently, as I was thinking it was the WinHandle).
Thanks again @mishem. I appreciate the time you're taking with this ;-)
r
Quote from mishem on November 14, 2021, 2:32 amYou'd have to be more specific about what you want to do. Or maybe you're going in the wrong direction?
You'd have to be more specific about what you want to do. Or maybe you're going in the wrong direction?
Quote from mishem on November 14, 2021, 2:34 am@rcohen
Interesting translation. :) That's not what I meant at all. But I hope you know what I mean. What exactly do you want to do? We need more information.
Interesting translation. :) That's not what I meant at all. But I hope you know what I mean. What exactly do you want to do? We need more information.

Quote from rcohen on November 14, 2021, 10:29 am@mishem, I apparently confused threads... as per the OTHER thread that asks which thread ;-)
I have set up global hotkeys for some functions that I want to paste into the software the user is already in (and have called the keyboard shortcut from). Instead the pub gets the focus when engaging the shortcut and I have no way of pasting it right back, programmatically. But as mentioned this was just to save the user from having to do a manual paste. Not very important, so I'll just not add this feature ;-0
@mishem, I apparently confused threads... as per the OTHER thread that asks which thread ;-)
I have set up global hotkeys for some functions that I want to paste into the software the user is already in (and have called the keyboard shortcut from). Instead the pub gets the focus when engaging the shortcut and I have no way of pasting it right back, programmatically. But as mentioned this was just to save the user from having to do a manual paste. Not very important, so I'll just not add this feature ;-0
Quote from mishem on November 14, 2021, 11:05 amBefore assigning global keys, you should make sure that they are not used anywhere in the system. Otherwise, it's a mess.
Before assigning global keys, you should make sure that they are not used anywhere in the system. Otherwise, it's a mess.
Quote from mishem on November 14, 2021, 11:25 am@rcohen
Below is an example on how to check the hotkeys.
Before you try to change something on someone else's computer, check 10 times to see if you are doing any damage. ;)
Below is an example on how to check the hotkeys.
Before you try to change something on someone else's computer, check 10 times to see if you are doing any damage. ;)
Uploaded files:
Quote from rcohen on November 14, 2021, 10:27 pmYou are absolutely correct @mishem, which is why I changed direction. I now use two hotkeys. I did some googling about unused hotkeys and without knowing what the user has installed that's not really possible. I will put this pub in my collection as one day I might again need it. Thanks for that. Do you have any of your work online? You seem to be a very strong coder, so I'm guessing you have software to sell ?
Thanks again.
You are absolutely correct @mishem, which is why I changed direction. I now use two hotkeys. I did some googling about unused hotkeys and without knowing what the user has installed that's not really possible. I will put this pub in my collection as one day I might again need it. Thanks for that. Do you have any of your work online? You seem to be a very strong coder, so I'm guessing you have software to sell ?
Thanks again.