Jump to content

cebroski

Member
  • Posts

    1
  • Joined

  • Last visited

cebroski's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Hi GuiB, I tried using your script replacing the three websites the original poster requested with the two websites I would like Firefox to open at the same time in one window (in two separate tabs). I am a complete newbie to applescript, so I do not completely understand what it is doing yet, however, it is successfully opening the two websites I want it to open in two separate tabs. However, there is an unwanted behavior of it opening a second blank firefox window in addition to the two tabs. So, I am wondering if there is a way to modify the script so that it does not open the extra firefox window. I'm wondering if this is happening because the original script was for three websites and I only need two? Thanks for reading and for your consideration. Here is the script I am running, based on the one you wrote. Thanks, Chris set urlList to {"https://voice.google.com", "https://riot.im/app/"} tell application "Firefox" activate repeat 40 times -- gives about 4 seconds to open Firefox if not opened if frontmost then exit repeat delay 0.1 end repeat tell application "System Events" to tell application process "Firefox" set oldNbrOfWindow to (count of windows) keystroke "n" using command down repeat 20 times if ((count of windows) > oldNbrOfWindow) then exit repeat delay 0.1 end repeat end tell repeat with the_url in urlList open location the_url end repeat -- close the first default tab tell application "System Events" keystroke tab using control down delay 0.2 keystroke "w" using command down end tell end tell
×
×
  • Create New...