On 02/07/2019, at 17:38, Charlie Garrison <[email protected]
<mailto:[email protected]>> wrote:
> Unless I'm missing something, no AppleScript needed. Look at man pbpaste to
> see all the options.
Hey Charlie,
I'm quite familiar with pbpaste.
My AppleScript does the following:
1) Makes sure the BBEdit pasteboard document exists on-disk.
- If NOT then it is created.
2) Makes sure that document is open in BBEdit.
- If NOT then it is opened.
3) Appends the current Clipboard text to the BBEdit pasteboard document with a
separator.
4) Leaves the newly added text selected, so it's easy to find and work with.
5) Saves the pasteboard document.
6) Includes error checking and reporting.
You can definitely do something like this in the shell:
bbedit ~/'Desktop/BBEdit PasteBoard File.txt'
pbpaste | bbedit --append
echo -e "\n---------------------------------------------\n" | bbedit --append
But you don't have nearly as much control over BBEdit with the shell as you do
with AppleScript.
For instance - the shell script forces BBEdit to activate, whereas AppleScript
gives you the choice of whether or not to do so.
A global script-runner app is still required, and FastScripts can run pure
shell scripts just as well as AppleScripts.
--
Best Regards,
Chris
--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.