Simple Scripts: Create a news screen

  1. Dictionaries
  2. Simple Scripts
  3. Automatically Reload Web Pages

We can do the same with web browser windows that we did with Finder windows. Type the following script into your AppleScript Editor and save it as an application called “Open News Overview”:

tell application "Safari"

activate

--{xStart, yStart, xEnd, yEnd}

--open CNN news in upper left

set CNN to make new document

set CNNWindow to window 1

set bounds of CNNWindow to {10, 25, 600, 600}

set URL of CNN to "http://www.cnn.com/"

--open Google news in upper right

set Google to make new document

set GoogleWindow to window 1

set bounds of GoogleWindow to {610, 25, 1210, 600}

set URL of Google to "http://news.google.com/"

--open Memeorandum in lower left

set Memeorandum to make new document

set MemeorandumWindow to window 1

set bounds of MemeorandumWindow to {10, 625, 600, 1200}

set URL of Memeorandum to "http://www.memeorandum.com/"

--open blog in lower right

set Blog to make new document

set BlogWindow to window 1

set bounds of BlogWindow to {610, 625, 1210, 1200}

set URL of Blog to "http://www.hoboes.com/Mimsy/"

end tell

This will open four windows arranged in a four-part square. You can edit the “bounds” of each window as you see fit.

  1. Dictionaries
  2. Simple Scripts
  3. Automatically Reload Web Pages