Based on “Open Firefox browser with Ruby automation script“, I made a script which would open all of my common internet sites when run, but it only does so if Firefox is already open. If it is not open, it will open one page, on one tab, and then sequentially open the rest, after I close each one.
I tried sleep(5) in case it just wasn’t ready, but that didn’t work.
My script was:
system("firefox somesite.com/")
system("firefox another.com/")
system("firefox aThirdSite.com/")
and when I ran it, it loaded all three pages in new tabs if Firefox was already open, but it loaded only the first if Firefox was not open. When I closed Firefox it loaded the second, then, when I closed it again it loaded the third.
Is there a way to open Firefox to each web site in separate tabs, given that Firefox is closed before running the script?
Ok, I just tried separating the web addresses by a space in a single system call, and that seems to have solved the problem. I don’t know if one is supposed to delete this or not, but I’ll leave it in case someone is searching for this.