Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / applescript / examples / tab_manipulation.applescript
blob9038c178b43a245880b058438fd170b44cfa076f
1 -- Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 -- Use of this source code is governed by a BSD-style license that can be
3 -- found in the LICENSE file.
5 -- Contains some common tab manipulation commands.
6 tell application "Chromium"
7 tell window 1 to make new tab with properties {URL:"http://google.com"}
8 -- create a new tab and navigate to a particular URL.
10 set var to active tab index of window 1
11 set active tab index of window 1 to (var - 1) -- Select the previous tab.
13 set var to active tab index of window 1
14 set active tab index of window 1 to (var + 1) -- Select the next tab.
16 get title of tab 1 of window 1 -- Get the URL that the user can see.
18 get loading of tab 1 of window 1 -- Check if a tab is loading.
20 -- Common edit/manipulation commands.
21 tell tab 1 of window 1
22 undo
24 redo
26 cut selection -- Cut a piece of text and place it on the system clipboard.
28 copy selection -- Copy a piece of text and place it on the system clipboard.
30 paste selection -- Paste a text from the system clipboard.
32 select all
33 end tell
35 -- Common navigation commands.
36 tell tab 1 of window 1
37 go back
39 go forward
41 reload
43 stop
44 end tell
45 end tell