Hello,
I had this problem too so i tried adding a delay of 0.5 seconds into the script - it now opens sparrow first before searching.
the script now reads...
on alfred_script(q)
delay 0.5
tell application "Sparrow" to activate --- activates sparrow
tell application "System Events"
tell process "Sparrow" --- implying Sparrow is already activated
key code 3 using {command down, option down} --- send cmd+alt+F to Sparrow invoking search
keystroke q --- enter the query
end tell
end tell
end alfred_script