Here is what I came up with - it brings nvAlt to front, focuses on input, and enters search query.
on alfred_script(q)
tell application "nvALT"
reopen
activate
tell application "System Events" to keystroke "l" using command down
tell application "System Events" to keystroke q
end tell
end alfred_script