I can script BBEdit to convert text in BBEdit.  I’m having trouble
with making it into a service: getting text temporarily into the
scratchpad, converting to ASCII there, returning it ... that has
stumped me, for some reason.  Halp?  The infrastructure for getting
text in and out is fine, I think.  I just don’t seem to know how to
convert the stuff on the scratchpad to ASCII.

on run {input, parameters}
        tell application "BBEdit"
                set wasVisible to visible of scratchpad window
                set contents of scratchpad window to input
                set w to open scratchpad window
                CONVERT TO ASCII text of w ???
                if not wasVisible then close w
                return contents of scratchpad window
        end tell
end run

Thanks in advance.

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