Ok, the previous script was rubbish.
This one is better and seems to work:
Code:
delay 4
tell application "Safari"
activate
end tell
tell application "System Events"
tell process "Safari"
repeat 200 times
click menu item "New Window" of menu "File" of menu bar 1
end repeat
end tell
end tell
That's for 20 windows.
If you want to try it, you'll need "Enable access for assistive devices"
selected in the Universal Acesss preference pane.
Hmm... I seem to have some issues. I just had 200 Safari windows
open and now Firefox has got into some weird state in which it is
not visible and unquittable. I think the Dock is feeling ill.