high light text in gui text field

Hi,

The following code copies data from a table row to a text field (works fine).


set contents of text field "trackName" to contents of data cell "Track Name" of theRow

Is there an option I can add so that in the text being put in the text field is also high lighted (selected) without any additional action from the user (e.g. double click)?

Thanks,
Brad

set the first responder to text field "trackName"

Just out of curiosity is your code within a tell statement? There are no references to a window in your code. If you have your code inside a ‘tell window "blerf’" statement then there’s no problem, otherwise you’ll need to refer to the window that the text field is in:

set the first responder of window "blerf" to text field "trackName" of window "blerf"

Hope this helps,
Brad Bumgarner, CTA

Brad, thanks your ‘responder’ code did what I wanted.

Yes, the statement was inside a tell statement.

Brad