Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

99
Vistas
AppleScript For Multiple Safari Tabs And Mouse Click?

Complete noob to AppleScript here with a rather complex one:

I would like automate a script that can do the following:

  1. After launching, waits for 61 minutes without doing anything, then:

  2. Opens Safari with 16 tabs (and 16 separate URLS)

  3. Clicks a “Roll!” button on each of the 16 tabs, then pauses for 10 seconds, then:

  4. Closes Safari

  5. Waits another 61 minutes, then:

  6. Performs 2 through 5 over again for a total of 15 repetitions.

One thing to note:

Each URL is unique to the other 15, but they are the same for every repetition.

Is this even possible? From my research into AppleScript I understand there will need to be a little Javascript in there too?

All help appreciated!! Cheers

UPDATE: Ok, I've been tinkering and I found a script to open the 16 tabs (set to generic URLS at the mo):

set urlList to {"http://www.macintouch.com/", "http://www.macnn.com/", "http://www.macworld.com/", "http://www.thinksecret.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/", "http://www.tuaw.com/"}
set numURLs to (count urlList)

tell application "Safari"
    activate
    -- create all the tabs that are needed
    tell application "System Events"
        -- enter the url in the open window
        keystroke (item 1 of urlList)
        key code 36
        repeat with i from 2 to (numURLs)
            -- for each additional url, first create a tab
            tell process "Safari"
                click menu item "New Tab" of menu "File" of menu bar 1
            end tell
            -- now enter the url
            keystroke (item i of urlList)
            key code 36
        end repeat
    end tell
end tell

Can someone help me from here in? The first thing I need is the delay function. So, before this script does anything it waits for 61 minutes.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda