Do you mean where Thunderbird isn't the foreground window (like using the included Close Program action)?
I admit, it does seem that closing a program by using the executable's name is something that S+ should have a direct action for. I'll have to add that to the TO DO list. In the meantime, I tested this script and it seemed to work for me:
local iHandle = 0 iHandle = acFindWindowByTitleRegex(".*Mozilla Thunderbird") if iHandle > 0 then acCloseApplication(iHandle, 0, 0) end
What it does is find the Thunderbird window by matching the window title to the regular expression pattern (".*Mozilla Thunderbird"), then passing the handle of the Thunderbird window to acCloseApplication. You could pass it into acTerminateProcess, but I only recommend using that action for when you want to force kill a process, not just exit the program normally.