Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Create AScript that open a tab on Firefox, wait X seconds, close and open other tabs

Hy guys,


would like to create an Apple Script that open a new tab on Firefox, stay on the page for like 1 minute than close the tab and open a new one and so on, stay 1 mnute close and open another tabs....


how can i do?


thanks

Posted on Jan 27, 2014 1:58 AM

Reply
4 replies

Jan 27, 2014 1:32 PM in response to daniele119

What's your reason for using Firefox?


Firefox has about the weakest AppleScript support of any browser. What you describe is trivial in Safari or even Chrome, but it's a PITA in Firefox.


If Firefox is needed for some other aspect of your workflow then fair enough, otherwise consider using a different browser for this task.

Jan 27, 2014 1:46 PM in response to daniele119

Here's a simplistic script that meets your given criteria for Safari. It might work for Firefox too since it's very dumb, but if you want to add checking (e.g. make sure that the window you're closing is the same one you opened, and not some other window that you've opened (and are working on!) then Firefox is out:


set theURL to "http://www.apple.com/"

repeat

tell application "Safari"


open locationtheURL


delay 60-- wait one minute


closewindow 1

end tell

end repeat

Jan 31, 2014 1:42 PM in response to daniele119

I guess I'm missing something. What in my above script doesn't meet your needs?

Is it that you want 12 different URLs in order? Nowhere in your original post did you mention that...


set theURLs to {"http://www.apple.com/", "http://www.google.com/", "http://www.facebook.com/"} -- extend as appropriate


repeat with theURL in theURLs

tell application "Safari"


open locationtheURL


delay 60 -- wait one minute


closewindow 1

end tell

end repeat

Create AScript that open a tab on Firefox, wait X seconds, close and open other tabs

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.