On Oct 08, 2015, at 12:54, Patrick Woolsey <[email protected]> wrote: > For reference, you can enter Unicode characters on a Mac by typing via the > "Unicode Hex Input" method (aka "source"). ______________________________________________________________________
Hey Patrick, Ha! That's good to know. > [*: You can also use the key shortcuts defined in the Shortcuts -> Input > Sources section of the Keyboard system prefs to switch input methods ] > > PS: Once you've set things up, this is actually much easier to do than it may > sound... :-) Let's make that even easier yet. Using Shane Stanley's BridgePlus ASObjC Library you can now AppleScript the input method directly (without having to use System Events). It's very fast. http://www.macosxautomation.com/applescript/apps/BridgePlus.html Install library here (since OSX 10.9): ~/Library/Script Libraries/ ------------------------------------------------------------------------------------------- # Example Usage ------------------------------------------------------------------------------------------- use framework "Foundation" use script "BridgePlus" load framework # Examples # set availableInputSources to (current application's SMSForder's availableInputSourceIDs()) as list # set allAvailableInputSources to (current application's SMSForder's allAvailableInputSourceIDs()) as list # Examples # set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.French" # set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.Russian" # set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.US" # Unicode Hex Input Method set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.UnicodeHexInput" ------------------------------------------------------------------------------------------- * The Unicode Hex Input method must be enabled in the system preferences, before it is accessible to script. -- Best Regards, Chris -- This is the BBEdit Talk public discussion group. 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> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
