Copy Text & URL

da
dafu
Posts: 564
Joined: Tue Jan 30, 2007 1:33 am
Platform: Mac
Location: Chicago
Contact:

Mon Jan 03, 2011 1:08 am Post

This weekend I was bustling about in Applescript and noticed that Automator now has a Get URL from Safari module. I remembered that there have been multiple requests on the forum for something like this so I built an Automator Service that will grab the current text selection in the Safari window, append the url of the page to it and put both up on the clipboard.

Qualifications
    This only will copy text
    This only works with Safari
    This probably only works in Snow Leopard because it uses new Automator features

Download the attached zip file, double-click it, and drag the resulting Text and URL to Clipboard.workflow file to [your home folder]/Library/Services

Happy New Year

Dave
Attachments
Text_And_URL_To_Clipboard.zip
Revised Jan 16, 2011
(108.34 KiB) Downloaded 40 times
Last edited by dafu on Sun Jan 16, 2011 3:04 pm, edited 2 times in total.

br
brett
Posts: 528
Joined: Tue Jul 11, 2006 3:17 am
Location: yet another Portlander

Sun Jan 16, 2011 8:00 am Post

Thanks so much for doing this. However, when I double click the zipped file, it produces another zipped file called TextAndURLToClipboard.zip.cpgz. When I double click that one, it produces another TextAndURLToClipboard.zip. Neither is the workflow you mentioned. Can you fix?

da
dafu
Posts: 564
Joined: Tue Jan 30, 2007 1:33 am
Platform: Mac
Location: Chicago
Contact:

Sun Jan 16, 2011 3:04 pm Post

brett wrote:However, when I double click the zipped file, it produces another zipped file


Somehow the forum software munged the zip file. I've put a new version in the original post that downloads correctly, now.

Dave

br
brett
Posts: 528
Joined: Tue Jul 11, 2006 3:17 am
Location: yet another Portlander

Sun Jan 16, 2011 8:39 pm Post

Ooh, I love new words! "Munged." Will have to remember that one.
Service works a treat now. What I'd really love is a two step option (1. select and 2. single keyboard shortcut) that would let me grab text and URL from a webpage or email or whatever and automatically drop both on a TextEdit or Bean file. But this is certainly almost as quick, and very helpful to those of us who hunt and gather on the web. Thanks again!

da
dafu
Posts: 564
Joined: Tue Jan 30, 2007 1:33 am
Platform: Mac
Location: Chicago
Contact:

Sun Jan 16, 2011 8:58 pm Post

brett wrote:What I'd really love is a two step option (1. select and 2. single keyboard shortcut) that would let me grab text and URL from a webpage or email or whatever and automatically drop both on a TextEdit or Bean file.


You can assign your own keyboard shortcut to the service in System Preferences/Keyboard.

Dave

br
brett
Posts: 528
Joined: Tue Jul 11, 2006 3:17 am
Location: yet another Portlander

Sun Jan 16, 2011 9:27 pm Post

... and so I shall! Already have them for clipping to Bean, Scrivener, and TextEdit. They just don't include the URL. Some people are never satisfied...
thanks again.

dr
druid
Posts: 1721
Joined: Fri Jun 22, 2007 2:29 pm
Platform: Mac, Win + Linux
Location: Princeton NJ, USA

Mon Jan 17, 2011 5:26 am Post

Ah Dave, the perils of software development.
Users!! :lol:

da
dafu
Posts: 564
Joined: Tue Jan 30, 2007 1:33 am
Platform: Mac
Location: Chicago
Contact:

Mon Jan 17, 2011 5:37 am Post

druid wrote:Ah Dave, the perils of software development.
Users!! :lol:


Gosh! I'd be ever so happy if you could just support my favorite text editor. I'm no programmer but I'm sure it couldn't be hard just to add a tweak to make my writing world blissful.


    E
    gedit
    Kate
    Leafpad
    Mousepad
    Notepad
    SimpleText
    TextEdit
    XEDIT
    Acme
    AkelPad
    Bluefish
    Caditor
    Crimson Editor
    Geany
    gedit
    J
    jEdit
    JOVE
    JuffEd
    Kate
    Kedit
    Kile
    KWrite
    Leafpad
    Leo
    mcedit
    Metapad
    MicroEMACS
    NEdit
    Notepad++
    Notepad2
    Pe
    Programmer's Notepad
    RText
    Sam
    SciTE
    Scribes
    Smultron
    TeXnicCenter
    The Hessling Editor
    UniRed
    X11 Xedit
    Yudit
    [edit]Freeware
    Arachnophilia
    BBEdit Lite
    ConTEXT
    Eddie
    GX Text
    Komodo Edit
    LEd
    Notepad+
    NoteTab Light
    Programmer's File Editor
    PSPad editor
    RJ TextEd
    q10
    TED Notepad
    TeXShop
    TextWrangler
    edit
    HTML Kit
    [edit]ProprietaryAlphatk
    BBEdit
    CodeWright
    GoldED
    CygnusEd
    E Text Editor
    EditPlus
    EmEditor
    Epsilon
    GWD Text Editor
    Inlage LaTeX Editor
    Kedit
    MED
    NoteTab
    PolyEdit
    skEdit
    SlickEdit
    Source Insight
    SubEthaEdit
    Tex-Edit Plus
    TextMate
    TextPad and Wildedit
    The SemWare Editor
    TopStyle
    UltraEdit
    Ulysses
    VEDIT
    WinEdt

Dave

br
brett
Posts: 528
Joined: Tue Jul 11, 2006 3:17 am
Location: yet another Portlander

Mon Jan 17, 2011 5:46 am Post

Actually, what would be even faster would be a little service that allowed me to just THINK what text I wanted moved from web page to whatever text editor or other app I could imagine and it would just happen automagically. No more messing with those pesky menu or keyboard commands. I'm sure it wouldn't take very long to to code .... Then you could work on one that would let me think of the basic idea for my next novel and have the words automatically appear in Scrivener, properly formatted of course. I'll be happy to beta test!

da
dafu
Posts: 564
Joined: Tue Jan 30, 2007 1:33 am
Platform: Mac
Location: Chicago
Contact:

Mon Jan 17, 2011 2:46 pm Post

a little service that allowed me to just THINK what text I wanted moved from web page to whatever text editor or other app I could imagine


It's back in the labs, I think. Unfortunately, it'll be a while: they can't get it to output anything other than the same sex scenes and GTD lists over and over. . . .


Dave