The best way I've found is to use the F6 key to select the address bar. The F6 key toggles between the address bar and the main window.
Code:
F3::
Loop, 2
{
Send, {F6}
ControlGetFocus, CurrentFocus, A
If CurrentFocus = MozillaWindowClass1
Break
}
Return
You can also use Alt+D or Ctrl+L, but if the address bar is not available these will open the Open Web Location window.
Note: The address bar is not the only controls that bears the name MozillaWindowClass1. It's safer to press F6 before checking to see if the current control is MozillaWindowClass1.