Autocomplete triggered onload

Autocomplete triggered onload

I use the autocomplete plugin on some of my pages, linked with a city database.
The plugin works perfectly, but I need it to work also when the page loads for the first time : if there is already some text in the field, I'd like to trigger a search, pick up the first result in the list, and then complete the field.
Is there a way I could do so ? The search() function seemed to be what I'm looking for, but I can't make it work.