If your application running the text document in the background supports AppleScript, look for a method to write/append text.
Use KMs Clipboard Manager to append all your text and URLs to a named clipboard (i.e. using a trigger like ⌥⌘C) and use a custom hotkey (i.e. ⌥⌘V) to paste its contents into your application and empty the named clipboard afterwards.
[quote="Rothermel, post:1, topic:621"]
I would like to copy text from a webpage… Then have that text and the url from the browser append to a text document running in the background without having to switch apps.[/quote]
Hey Kevin,
Well that's simple enough if you can live with plain text.
The script I’m using (Send Notes Quickly) just copies a marked part of a webpage and appends it to the same TextWrangler doc, together with url, title, timestamp! Works with Safari and Chrome. (Got help with it from this community!)
Send Notes Quickly - GText_1
Triggered by any of the following:
The Hot Key ⌃⌥⌘L is pressed
Will execute the following actions:
–Copy to Named Clipboard ‘TempQuickN-a’
–If All Conditions Met
Condition iconApplication ‘Safari’ is at the front
Execute the Following Actions:
–Set Variable ‘url’ to Text
%SafariURL%
Otherwise, Execute the Following Actions:
–Set Variable ‘url’ to Text
%ChromeURL%
–Pause for 0.5 Seconds
–If All Conditions Met
Condition iconApplication ‘Safari’ is at the front
Execute the Following Actions:
–Append Text
capt. %NumberDate% %ShortTime% ===
URL: %url% ===
%SafariTitle%
%NamedClipboard%TempQuickN-a%
To file: /Users/okn/Documents/notes-a_2014.txt
With format Plain Text (UTF8).
–Pause for 0.5 Seconds
–Type the Return Keystroke
–Type the Return Keystroke
Otherwise, Execute the Following Actions:
–Append Text
capt. %NumberDate% %ShortTime% ===
URL: %url% ===
%ChromeTitle%
%NamedClipboard%TempQuickN-a%
To file: /Users/okn/Documents/notes-a_2014.txt
With format Plain Text (UTF8).
–Pause for 0.5 Seconds
–Type the Return Keystroke
–Type the Return Keystroke
–Speak Text With Voice ‘Veena’ at Default Rate
General text was appended at the end!
–Comment ‘If Then Macro to sort the 2 options’
This saves title, url & some marked text!
Now this script was designed by Chris S., now as vs. 1.0.3 and I could not avoid from fiddling with the fonts, font size (22pt!), font color, and date (European, such as 2015-06-02), as vs. 1.0.3b.
Usage: On any website, (Safari or Chrome) just mark som text which you find most important, press the designated hotkey and that's it! A new file with all the necessary info is in your /Users/{YOURNAME}/Documents/_INPUT folder or whatever you want to call it! It is really beautiful piece of automation.
PS: If later in the text I realize I need to add more to the original clipping I bring up the last file with another macro (Open last file in INPUT) and add more to it.