We have five tabs open in Firefox each loaded with a specific website say [login to view URL] through a5.com. These websites are always loaded in the same order. Each of these sites feature a search box. We need a program that pastes a search term into the search box of these websites. At the start, the program will have to ask the user which of these websites to choose, so for example a 12 response would indicate the user wants the the search term to be pasted in the first and second tab. A response of 345 would indicate the 3rd, 4th and the 5th tabs.
We want the program to do this without bringing firefox into focus so that when we go back to it, we have the search results ready.