|
Post by Guest on Jan 6, 2022 6:47:42 GMT
Trying to figure out how to code this. For my purposes there is a difference between the Keyboard 7 and the Numberpad 7.
When I use the Record Option, they both list it as Keypress 7 and my script won't work.
What is the code for to get it to recognize the Keypad 7??
|
|
|
Post by philranger on Jan 7, 2022 3:47:30 GMT
I don’t think that MMM can differentiate them, sorry
|
|
|
Post by zeak on Jan 17, 2022 23:18:19 GMT
Hi Steve, Do you think this should be added to the improvement list? Personally I have a few hotkeys that use Numpad over Number row keys as well as Excel uses certain functions with Numpad. Cheers, Zeak
|
|
|
Post by Steve on Jan 18, 2022 5:17:21 GMT
Hi zeakYeah i will look in to it and let you know. Cheers.
|
|
|
Post by Palindar on Feb 22, 2022 18:47:14 GMT
I have a game Neverwinter nights. It uses the numpad to enter commands and the number buttons as hotkeys.
I tried to program a macro with mini mouse but it does not recognise the numpad keys on playback.
|
|
|
Post by Victor on Feb 28, 2022 19:50:25 GMT
I have a game Neverwinter nights. It uses the numpad to enter commands and the number buttons as hotkeys. I tried to program a macro with mini mouse but it does not recognise the numpad keys on playback. Hi, If I'm not wrong in all/most games where you have hotkeys, they record those as NUMPAD7 for example. Have you tried it like that?
|
|
|
Post by Palindar on Mar 2, 2022 14:05:48 GMT
I tried it by using the manual edit of the macro entry so it says NUMPAD0 and when run it typed out NUMPAD0 as the entry (i tested in notepad) instead of 0 from the numpad.
|
|
|
Post by Palindar on Mar 2, 2022 14:11:25 GMT
I saw this in the event log.
03/02/2022 02:08:43.34 PM Playback error: 4 | 1611 | 1259 | 1794 | Numpad 0 - Not a standard action or multi text out [not an error]: Keyword "Numpad 0" is not valid.
Is there somewhere with a list of valid keywords?
I tried Numpad 0 and Numberpad 0 but that didnt work either.
|
|
|
Post by Steve on Mar 7, 2022 21:44:55 GMT
I saw this in the event log. 03/02/2022 02:08:43.34 PM Playback error: 4 | 1611 | 1259 | 1794 | Numpad 0 - Not a standard action or multi text out [not an error]: Keyword "Numpad 0" is not valid. Is there somewhere with a list of valid keywords? I tried Numpad 0 and Numberpad 0 but that didnt work either. Hi Palindar, Playback error: 4 | 1611 | 1259 | 1794 | Numpad 0 - Not a standard action or multi text out [not an error]: Keyword "Numpad 0" is not valid. This log entry occurred because you forgot the standard 'Keypress' keyword prior to the text 'Numpad 0'. This entry is telling us that the entry is not standard but it's trying it anyway. The best way to find keywords is just to record a macro and press the keys. Here are the numpad mappings. They are different depending on if you have 'numlock' on or off at the time of recording. 1 | X | X | 100 | Keypress NUMLOCK 2 | X | X | 100 | Keypress 0 3 | X | X | 100 | Keypress . 4 | X | X | 100 | Keypress 1 5 | X | X | 100 | Keypress 2 6 | X | X | 100 | Keypress 3 7 | X | X | 100 | Keypress 4 8 | X | X | 100 | Keypress 5 9 | X | X | 100 | Keypress 6 10 | X | X | 100 | Keypress 7 11 | X | X | 100 | Keypress 8 12 | X | X | 100 | Keypress 9 13 | X | X | 100 | Keypress NUMLOCK 14 | X | X | 100 | Keypress INSERT 15 | X | X | 100 | Keypress DELETE 16 | X | X | 100 | Keypress END 17 | X | X | 100 | Keypress DOWN 18 | X | X | 100 | Keypress PGDN 19 | X | X | 100 | Keypress LEFT 20 | X | X | 100 | Keypress CLEAR 21 | X | X | 100 | Keypress RIGHT 22 | X | X | 100 | Keypress HOME 23 | X | X | 100 | Keypress UP 24 | X | X | 100 | Keypress PGUP
|
|
|
Post by Steve on Mar 9, 2022 21:26:13 GMT
Hi Steve, Do you think this should be added to the improvement list? Personally I have a few hotkeys that use Numpad over Number row keys as well as Excel uses certain functions with Numpad. Cheers, Zeak Hi zeakDoes that list above help?
|
|
|
Post by zeak on Mar 11, 2022 4:55:09 GMT
Hi Steve , The above list works for using the numeric keys above the alphabet Keys but does not account for utilizing the number pad when replaying the numbers recorded. the main reason I use the numpad keys particularly in excel is for my macros in excel VBA. Here is an example of my macro in VBA. Sub CreateShortcuts()
Application.OnKey "^{96}", "ColourChange1"
End Sub
Sub DeleteShortcuts()
Application.OnKey "^{96}"
End Sub
Sub ColourChange1()
Selection.Interior.Color = RGB(102, 255, 255)
End Sub Excel VBA refers to the Key code used that can be found in this website docstore.mik.ua/orelly/webprog/DHTML_javascript/0596004672_jvdhtmlckbk-app-b.htmla keypress for 5 is keycode 53 and a keypress for numpad 5 is keycode 101. Below is an example of trying to record my macro shortcut and replay it, Macro shortcut is Control + Numpad 5 & Control + Numpad 0. I also noticed when you use the keyboard shortcut function in MMM to remove X Y coordinates that it removed the Key Up and Key Down if there was a key modifier in the line.
|
|
|
Post by Palindar on Mar 11, 2022 11:25:26 GMT
I went back and retested and not able to get the numpad keys to record as numpad but it instead converts them to normal number keys that you find in the top row across the keyboard.
As the previous post mentioned they are really different keys that need to be detected differently to normal numeric keys. Programs that are automatable use the number and numpad keys for different purposes.
The keypress command needs to added for keyword Numpad[x] instead of typing out the letters Numpad when you execute the macro.
|
|
|
Post by Steve on Mar 11, 2022 20:29:26 GMT
Thanks zeak and Palindar, I have to ask, are you sure you are recording with numlock off? MMM will record the numbers when numlock is on and record the numpad actions when it’s not on. It should be like the example above. If you are using numlock and still not getting the same as above then maybe it’s something else. Are you using a standard full keyboard, laptop keyboard, or external number pad?
|
|
|
Post by Palindar on Mar 12, 2022 12:25:39 GMT
I have a 17 inch HP omen laptop with a numpad as it's a large laptop. Since you make me think it could be different as it's a laptop I did some testing.
I recorded again macros with the laptop numberpad and as a second test a software keyboard built into windows called on screen keyboard.
I recorded a macro to test the key detect difference between numpad and the number keys on the top row. I also check the num lock was working and it output number not the other keys which MM detects if in the other mode for things like END, HOME etc.
MMM records each number keypress as Keypress x (where x is a number i typed). it cant differentiate between numpad and normal number keys.
To make really sure it not my hardware or something else i started another macro software called Macro recorder and it detected the numpad keypresses were different to the top row number keys as it labels the numppad keys as NumPadX when i press them.
So it seems that my laptop hardware is working ok but that MMM cant differentiate between numpad keys and number keys.
Have you been able to record a macro with both number pad keys and normal keys. how does it show up in the macro ? Please share a screen shot if you can.
Please be aware that i dont want to actually type the numbers, as software that the macro recorder wants to automate is bound to the numberpad keys and not the top number keys and so it does not type the number out on screen or in a text box like how you may imagine why i want to type numbers.
|
|
|
Post by Steve on Mar 13, 2022 20:33:25 GMT
Please be aware that i dont want to actually type the numbers, as software that the macro recorder wants to automate is bound to the numberpad keys and not the top number keys and so it does not type the number out on screen or in a text box like how you may imagine why i want to type numbers. Ok I get it. MMM strips the 'numpadX' and replaces it with it's numeric key value. Numpad1 becomes 1, numpad2 becomes 2, and so on. The problem is that '1' is not 'numpad1' for a lot of applications like how your application wants to use it. This leaves MMM unable to provide a real representation of the numeric keyboard. I've fixed this for the next update. Now numpadX will equal numpadX. I appreciate the persistence here in getting your point across. I completely overlooked this one. Thanks zeak and @palindar.
|
|