selecting a text field programmatically or through IB

In my app there is a keyboard shortcut that toggles the drawer and there are a couple text fields in the drawer. How would I make the first text field already selected and ready to type in when the drawer opens? This is so the user can execute the k-shortcut and start typing right away without clicking in the textbox.

anyone?

Hi Hendo,

something like

tell window "main" to set first responder to text field "Text" of drawer "Drawer"

hmm…that didn’t work…I put it in the on launched handler, is that correct?

I would execute it when the drawer opens

that worked great, thanks :smiley: