Solved

How do I script FileMaker to change OS X keyboard layout?

Posted on 2011-09-28
3
558 Views
Last Modified: 2012-05-12
I am creating a database that i intend to use on Filemaker Go as well as FMPA to track and review foreign language vocabulary words. I need to write a script that will change the OS keyboard to Arabic (or any other non-Roman layout) upon entering certain fields and back to the default on entering other fields. I suspect Applescript could do this, but I don't know any Applescript. If there is a method in FMPA, that would be better.
0
Comment
Question by:MarkJulie
3 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 36815194
I used to do some Applescript many years ago and this was actually quite doable under OS 9 and earlier, but unfortunately all the System settings are now handled through System Preferences and System Preferences does not seem to offer the same degree of scripting control. I did some research and there are some complicated ways of manipulating the GUI using Applescript that might get you what you want in a very kludgy way, but I'm unable to find anything that would allow you to simply script a keyboard layout change directly. I also opened Script Editor and checked the Dictionary for System Preferences directly and couldn't see anything that would make it work...
0
 

Author Comment

by:MarkJulie
ID: 36815798
Thanks for the good reply with disappointing content. I will leave this open for the moment.
0
 
LVL 10

Accepted Solution

by:
webwyzsystems earned 500 total points
ID: 36816039
try the Apple Script command: Use Shell Script

Then, try executing something like this:

defaults write ~/Library/Preferences/ByHost/com.apple.HIToolbox.0017f2c31710 AppleCurrentKeyboardLayoutInputSourceID -string "com.apple.keylayout.US"
killall SystemUIServer

By flipping the "write" part to "read" you can glean more up to date and accurate values. Check the syntax manually in terminal first though. Probably best to play with read to get comfortable.

Use Shell Script does give you some more power to manipulate the local system.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MAC Startup Program 12 47
apple tv fire 15 54
Which Mac app runs? 2 28
Time machine backup 4 31
A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question