On 08/23/2018, at 09:45, Christopher Stone <[email protected]
<mailto:[email protected]>> wrote:
> On 08/22/2018, at 18:06, Barbara Snyder <[email protected]
> <mailto:[email protected]>> wrote:
>> I have a bunch of open files. I'd like to create a project that includes all
>> open files (without me having to add them individually). Is there a way to
>> do this? Or do I have to enter a feature request?
>
> Save this Bash script to a file here:
Hey Barbara,
Here's an AppleScript alternative to the shell script I posted.
Save as a compiled script using the Apple Script Editor.app to:
~/Library/Application Support/BBEdit/Scripts/
Similarly to the Bash script you can assign it a keyboard shortcut or just run
it from the script menu.
--
Best Regards,
Chris
----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2018/08/24 12:35
# dMod: 2018/08/24 12:35
# Appl: BBEdit
# Task: Create Synthic Project from Open Text Documents.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Create, @Synthic, @Project, @Open,
@Text, @Documents
----------------------------------------------------------------
tell application "BBEdit"
set fileList to file of text windows whose on disk is true
set winList to text windows whose on disk is true
end tell
repeat with i in fileList
set contents of i to quoted form of (POSIX path of (contents of i))
end repeat
set AppleScript's text item delimiters to " "
set fileList to fileList as text
set shCMD to "
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH;
bbedit --project " & fileList & "&> /dev/null &"
do shell script shCMD without altering line endings
set closeOldWindows to true -- set to false if you don't want to close the old
windows.
if closeOldWindows then
tell application "BBEdit"
repeat with theWin in winList
close theWin
end repeat
end tell
end if
----------------------------------------------------------------
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://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.