On Dec 10, 2010, at 01:37, ricolich wrote:
> 
> I sometimes want to open files in BBEdit, without it trying to hand the file 
> over to some helper app, for instance webloc-files, which really are plain 
> XML files, but BBEdit insists on handing it over to the browser.
> 
> Likewise with some image files, where I would want BBEdit to NOT open it as 
> an image file, but just as a binary chunk.
> 
> So, how can stop BBEdit from being "smart"?
______________________________________________________________________

Webloc files are easy:

tell application "Finder" to set fileList to selection as alias list
tell application "BBEdit"
        open fileList opening in new_window
end tell

Unfortunately this doesn't work for image files.  You can change the file 
suffix to '.txt' and do it though.

tell application "Finder"
        set fileList to selection as alias list
        repeat with ndx in fileList
                set name extension of ndx to "txt"
        end repeat
        tell application "BBEdit"
                open fileList opening in new_window
        end tell
        repeat with ndx in fileList
                set name extension of ndx to "jpg"
        end repeat
end tell

Not elegant, but it works.

--
Chris

-- 
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>

Reply via email to