rowen-- My suggestion won't work. The change-case menu command changes case only according to the last-set option (e.g. to Upper, Lower, Capitalize..). Here's a script that will change case to the opposite of that of the first letter in the selection.
----------Script Begins----------- (* Change case of selection *) tell application "BBEdit" set _result to find "(?s)(.*?)([a-zA-z])(.+)" searching in selection of text window 1 options {search mode:grep, starting at top:false, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} if found of _result then set _found to grep substitution of "\\2" else display dialog "Error...either the selection is empty or it contains no letters." return end if set _lowcase to "abcdefghijklmnopqrstuvwxyz" considering case if _found is in _lowcase then change case selection of text window 1 making raise case with replacing target else change case selection of text window 1 making lower case with replacing target end if end considering end tell -----Script Ends---------- On May 22, 7:21 pm, Steve Samuels <sjsamu...@gmail.com> wrote: > You can assign a hotkey to "Change Case" in the "Menus" > Preferences.pane ("Text" Menu).. > > Steve > > On May 19, 8:13 pm, rowen <ro...@uw.edu> wrote: > > > > > Is there a trick to assigning hotkeys for changing the case of > > selected text? I realize I can write scripts and assign hotkeys to > > those, but I'd rather not clutter up the scripts menu if I don't have > > to. -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>