How to script number pad key
Try using the key code command:

osascript -e 'tell app "System Events" to key code 87'


See Events.h for the key codes. Here are the key codes for all numpad keys:

65 KeypadDecimal
67 KeypadMultiply
69 KeypadPlus
71 KeypadClear
75 KeypadDivide
76 KeypadEnter
78 KeypadMinus
81 KeypadEquals
82 Keypad0
83 Keypad1
84 Keypad2
85 Keypad3
86 Keypad4
87 Keypad5
88 Keypad6
89 Keypad7
91 Keypad8
92 Keypad9