summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript')
-rw-r--r--chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript24
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript b/chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript
new file mode 100644
index 0000000..d45bd86
--- /dev/null
+++ b/chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript
@@ -0,0 +1,24 @@
+-- Copyright (c) 2010 The Chromium Authors. All rights reserved.
+-- Use of this source code is governed by a BSD-style license that can be
+-- found in the LICENSE file.
+
+tell application "Chromium"
+ tell tab 1 of window 1
+ print -- Prints the tab, prompts the user for location.
+ end tell
+
+ tell tab 1 of window 1
+ save in "/Users/Foo/Documents/Google" as "only html"
+ -- Saves the contents of the tab without the accompanying resources.
+
+ save in "/Users/Foo/Documents/Google" as "complete html"
+ -- Saves the contents of the tab with the accompanying resources.
+
+ -- Note: both the |in| and |as| part are optional, without it user is
+ -- prompted for one.
+ end tell
+
+ tell tab 1 of window 1
+ view source -- View the HTML of the tab in a new tab.
+ end tell
+end tell