Package AccessEngine :: Package AccessEngineAPI :: Module Utils
[hide private]
[frames] | no frames]

Module Utils

source code

Provides utility methods that assist AEScript developers in processing accessibility information, but do not touch accessible objects, do output, handle input, manage the SUE system, etc.


Authors:
Brett Clippingdale, Peter Parente, Frank Zenker, Ramona Bunk
Organizations: Copyright:

License: The BSD License All rights reserved. This program and the accompanying materials are made available under the terms of the BSD license which accompanies this distribution, and is available at http://www.opensource.org/licenses/bsd-license.php

Functions [hide private]
string
getColorString(val)
Tries to map a given RGB string (if in form "u,u,u") to a nearby color name.
source code
string
convertPOSIXToIANA(lang)
Converts a POSIX language string to a IANA language tag following RFC 4646 http://www.ietf.org/rfc/rfc4646.txt, the format recommended for AEOutput device language settings.
source code
Function Details [hide private]

getColorString(val)

source code 
Tries to map a given RGB string (if in form "u,u,u") to a nearby color name.
Parameters:
  • val (string) - Representation of an RGB color in form "u,u,u"
Returns: string
Localized color name if val param is valid format, otherwise None

convertPOSIXToIANA(lang)

source code 

Converts a POSIX language string to a IANA language tag following RFC 4646 http://www.ietf.org/rfc/rfc4646.txt, the format recommended for AEOutput device language settings.

The POSIX format is language[_territory][.codeset]

Some examples include "en", "fr_CA", "en_US.UTF-8". Ambiguous conversions such as "zh_CN" are allowed, but do not pinpoint specific spoken dialects (i.e. Mandarin, Cantonese, Pinyin, Taiwanese Mandarin, etc.) The code set is currently ignored, though may serve as a hint for the dialect in the future.
Parameters:
  • lang (string) - POSIX locale string
Returns: string
IANA language tag