On Feb 14, 2013, at 15:18, David Donachie <[email protected]> wrote: > At the moment the only way I can find to get an SFTP file into a Project is > to open an SFTP browser in BBEdit, then drag the icon for the file to the > Project window. > ... > My normal workflow is to open files from Fetch (a much faster SFTP browser > than BBEdit's), but I can't drag files from Fetch to the Project window > ... ______________________________________________________________________
Hey David,
Hmm…
When you open a remote file for editing with Fetch it downloads a copy to a
temp file, opens that in the designated editor, and then monitors the file for
changes and uploads them.
BBEdit isn't too sanguine about adding temp files to a project.
To do what you're wanting you'll need to actually open the remote file with
BBEdit.
Give the attached Applescript a try. It will open one or more items selected
in Fetch in BBEdit. From there you can drag each of them via their icon into
any project window's file panel.
At this point I see no means to add them via script to a project's file panel.
(I've sent a query to Bare Bones about that and am awaiting an answer.)
You can run the script from BBEdit's script menu, or if you have a utility like
FastScripts or Keyboard Maestro you can give it an app-specific keyboard
shortcut (Fetch in this instance).
Another less handy option is Apple's own Applescript menu which can be
activated from the preferences panel of the Applescript Editor.
--
Best Regards,
Chris
-------------------------------------------------------------------------------------------
try
set urlList to {}
tell application "Fetch"
set _sel to selection
if _sel ≠ {} then
repeat with i in _sel
set end of urlList to i's url
end repeat
else
error "No items selected in Fetch."
end if
end tell
tell application "BBEdit"
activate
repeat with i in urlList
open location i
end repeat
end tell
on error e number n
set e to e & return & return & "Num: " & n
tell me to set dDlg to display dialog e with title "ERROR!" buttons
{"Cancel", "Copy", "OK"} ¬
default button "OK" giving up after 60
if button returned of dDlg = "Copy" then set the clipboard to e
end try
-------------------------------------------------------------------------------------------
--
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
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].
For more options, visit https://groups.google.com/groups/opt_out.
<<inline: Screen Shot 2013-02-15 at 02.49.00.jpg>>
