We use an auto login script using ARD to avoid visiting each station in our lab. Mountain Lion no longer works so that a cursor appears at the login screen. I've tried numerous scripts to activate the cursor to no avail. Pressing 5 on they numerical pad will do it as will a generic mouse down action. To avoid having to do this at each computer, how can I script one of these actions in an osascript? thank you in advance.


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
  • Thanks, Lauri. I had tried that and it didn't work. If I control stations one at a time in ARD and press the 5num key it works but not within a script. – Marlene Oct 5 '13 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .