At 19:08 +0000 12/11/10, John Delacour wrote: >On 11 December 2010 05:36, ricolich ><[email protected]> wrote: > >> I was probably not very clear in my question:... >> ... I just want to be able to open the file and view it's content in >> BBEdit, just as I can with any other type of text file, without BBEdit >> handing it over to any other app > >Try this Apple/Perl script: > >set _choice to choose file >set _f to POSIX path of _choice >set _tempdir to POSIX path of (path to temporary items from user domain) >set _tempfile to _tempdir & "temp.txt" >do shell script "perl -e \" >chdir qq~" & _tempdir & "~; >open F, qq~" & _f & "~; >open F2, qq~>" & _tempfile & "~; >while (<F>) {print F2} >close F2;\"" >tell application "BBEdit" to open (POSIX file _tempfile) as alias > >--JD
Does the bbedit UNIX tool behave the same way as an open in the BBEdit application? What about ending that with do shell script "/usr/bin/bbedit quoted form of POSIX file _tempfile" Perhaps the perl stuff would not be necessary. It's easy to make an AppleScript that could be named bbedit and even put into the dock. -- --> A fair tax is one that you pay but I don't <-- -- 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>
