-------------------------------------------------------------------------------------------
Give it a keyboard shortcut and go-to-town.
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
set bbeditText to bbeditFrontWinText()
set shCMD to "java -jar ~/Downloads/yuicompressor-2.4.8.jar --type css --charset utf8 <<< " & quoted form of bbeditText
set minifiedCSS to do shell script shCMD
# Do whatever you want with the minifed css.
-------------------------------------------------------------------------------------------
--» HANDLERS
-------------------------------------------------------------------------------------------
on bbeditFrontWinText()
tell application "BBEdit"
tell front document to its text
end tell
end bbeditFrontWinText
-------------------------------------------------------------------------------------------
* Note that you should pick a more permanent path for the yuicompressor module.