With BBEdit 9, I had been using the script below to toggle the Strip
Trailing Whitespace feature. It *could* be adapted to do what you need, if
it still worked. The hard part was always getting BBEdit to recognize that
the plist file had changed while it was running, which is the reason the
script switches to Finder and back to BBEdit.
But this hack doesn't seem to work in BBEdit 10. You have to actually quit
BBEdit and re-run it for the change to be recognized.
set butt to *text* of button returned of (*display alert* "Set Strip
Trailing Whitespace to:" buttons {"On", "Off"})
if butt is "On" then
set val to "YES"
else
set val to "NO"
end if
*do shell script* "defaults write com.barebones.bbedit
Filing:StripTrailingWhitespace -bool " & val
tell *application* "Finder" to *activate*
tell *application* "BBEdit" to *activate*
tell *application* "BBEdit" to *activate*
*
*
--
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>