Small utility script — Opens all of the currently open tabs in Safari in Google Chrome. Alfred Users — You Can Now Download an Workflow of This Script Here LaunchBar 6 Users — You Can Now Download a LaunchBar action of this Script Here

(*
◸ Veritrope.com
Open Safari Tabs in Chrome
Version 1.0
April 18, 2011

// TERMS OF USE:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

// LIKE THIS SCRIPT?
If this AppleScript is helpful to you, please show your support here:
http://veritrope.com/support

// SCRIPT INFORMATION AND UPDATE PAGE
http://veritrope.com/code/open-safari-tabs-in-chrome

// REQUIREMENTS
More details on the script information page.

// CHANGELOG
1.0 Initial Release
*)


set list_Tabs to {}
tell application "Safari"
    set the_Tabs to (tabs of every window)
    repeat with the_Tab in the_Tabs
        set the_Items to (every item of the_Tab)
        repeat with the_Item in the_Items
            copy URL of the_Item to end of list_Tabs
        end repeat
    end repeat
end tell

tell application "Google Chrome"
    repeat with list_Tab in list_Tabs
        set myTab to make new tab at end of tabs of window 1
        set URL of myTab to list_Tab
    end repeat
end tell

Small utility script — Opens all of the currently open tabs in Google Chrome in Safari. Alfred Users — You Can Now Download a Workflow of This Script Here LaunchBar 6 Users — You Can Now Download an Action of this Script Here

(*
Veritrope.com
Open Chrome Tabs in Safari
Version 1.0
April 18, 2011

// TERMS OF USE:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

// LIKE THIS SCRIPT?
If this AppleScript is helpful to you, please show your support here:
http://veritrope.com/support

// SCRIPT INFORMATION AND UPDATE PAGE
http://veritrope.com/code/open-chrome-tabs-in-safari

// REQUIREMENTS
More details on the script information page.

// CHANGELOG
1.0 Initial Release

*)


(*
======================================
// MAIN PROGRAM
======================================
*)


set list_Tabs to {}

tell application "Google Chrome"
    set the_Tabs to (tabs of every window)
    repeat with the_Tab in the_Tabs
        set the_Items to (every item of the_Tab)
        repeat with the_Item in the_Items
            copy URL of the_Item to end of list_Tabs
        end repeat
    end repeat
end tell

tell application "Safari"
    repeat with list_Tab in list_Tabs
        set myTab to make new tab at end of tabs of window 1
        set URL of myTab to list_Tab
    end repeat
end tell

On the Evernote Forum, I caught sight of this thread, which began: “When I clip a web page to a new note, I usually want to add a comment at the top of the note. But this seems to be difficult or impossible. Could Evernote insert a blank line at the top of clipped pages […]

(*
http://veritrope.com
Evernote -- Add Text To Beginning of Notes
Version 1.0
January 10, 2011
Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/evernote-add-text-to-beginning-of-notes
*)


(*
======================================
// CONFIGURATION (USER EDITABLE)
======================================
*)

--CHANGE THIS PROPERTY TO THE HTML CODE YOU'D
--LIKE TO ADD TO THE BEGINNING OF YOUR NOTE.
--(DEFAULT IS 5 LINE BREAKS AND A HORIZONTAL RULE)
property add_to_top : "<br /><br /><br /><br /><br /><hr />"
(*
======================================
// OTHER PROPERTIES (DO NOT CHANGE)
======================================
*)

property noteHTML : ""
(*
======================================
// MAIN PROGRAM
======================================
*)

tell application "Evernote"
    try
        set theNotes to selection
        repeat with theNote in theNotes
            set noteHTML to (HTML content of item 1 of theNote)
            set addString to "<body>" & add_to_top
            set editHTML to my replaceString(noteHTML, "<body>", addString)
            set (HTML content of item 1 of theNote) to editHTML
        end repeat
    end try
end tell

(*
======================================
// HANDLER SUBROUTINES
======================================
*)

--REPLACE SUBROUTINE
on replaceString(theString, theOriginalString, theNewString)
    set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, theOriginalString}
    set theStringParts to text items of theString
    if (count of theStringParts) is greater than 1 then
        set theString to text item 1 of theStringParts as string
        repeat with eachPart in items 2 thru -1 of theStringParts
            set theString to theString & theNewString & eachPart as string
        end repeat
    end if
    set AppleScript's text item delimiters to od
    return theString
end replaceString