How to Get AutomationElement of windows from the control ID - automation

I am trying to open notification tray(notification chevron) from the code using UI Automation but I am able to access the AutomationElement only from the accessible name like ( var chevron = AutomationElement.RootElement.Find("Notification Chevron"); ) this code works fine in English Operating System.
but here is one problem in this approach that, when I try to run this code in other language operating system like Italian OS, French OS etc.. then the code is not working as the accessible name of notification tray changes from "Notification Chevron" to specific language like in italian it changes to "Virgolette acute notifica" , similary it changes from french OS and other language OS.
I have tracked the properties of control throgh Ronerx in English and Italian and found that accessible name change with the OS but control ID remains same. So if there is any method to get AutomationElement from Control ID ? or any other way to solve this problem.
Image of properties of notification chevron in both Italian and English OS

Related

How to change MsgBox button language

I understand that the language of Message Box buttons is linked to the language of the Windows system. But this may not be the language of the end user. For instance, in a county like Switzerland having four official languages (German, French, Italian and Romansh), it is not unusual for a Windows system to be set up in English and not fit the user's needs. Adjusting the Windows Regional and Language options does not affect the language of Message Box buttons.
Is there any way to dynamically set an application to respect the System.Globalization.CultureInfo.CurrentCulture.LCID instead of the system language? I tried playing around with the parent form Localizable and Language settings with no success.
Any insight would be appreciated. Thanks!

Using Applescript to switch VoiceOver language in osx

I am developing a multi-language OSX app which also uses text-to-speech.
I am using mac's VoiceOver and Applescript to control it.
In the app, users can switch languages and VoiceOver has to read the text in the selected language.
The goal is to switch VoiceOver language without quitting my application.
I can't find a way in Cocoa or Applescript to find out what is the current language in VoiceOver and to actively specify what language to set.
This is what I have done so far.
In VoiceOver Utility there is a section called Activities that lets you setup some VoiceOver configurations, including the language.
So I created an English and a French activity.
Then I found this really helpful list of commands that you can use in Applescript to control VoiceOver: http://www.cbtbc.org/tools/asvo/voec.php
In this list the only commands that control VoiceOver activities are: "open activity chooser"
and "previous activity"
"previous activity" changes the language, but there's no way to know what activity you are currently on or to specify the name of the activity that you want to go to (English or French) when the user presses the language button.
So for example, if the user clicks on the English button twice, or switches the app language when the VoiceOver is off, the application might be showing English text while the VoiceOver might be set in French.
Anybody had experience with this?
Thank you so much for your help!

Change the language of ““YourApp” Would Like to Use Your Current Location”

When using location services, I get this message: ““YourApp” Would Like to Use Your Current Location”
Is there any way to change this to another language, even if the iOS language is set to English? (My app comes in one non-English language only, so it’s weird to have that English dialog pop up in my non-English app.)
If you are using CLLocationManager, you can set its purpose property to any text you like.
This text will be displayed in addition to and under the standard "AppName Would Like To Use Your Current Location" text.
I would be very surprised if you can do that!
This is a matter of user privacy and it should be stated in the language selected by the user not you (developer).
On stock OS iOS devices, the language of OS privacy warnings is under user control, not an app's control via any public API.

Information Popup in Mac

I am developing an application for Mac OS , i need to display a information popup in Mac, In Windows OS context, it should be similar to the one, which used to be displayed near by tray-icon,
More real example is, assuming any messenger application is running, and someone form your contact list became online/available,then Messenger App display a Animated Popup near by tray-icon area,
the same use-case i am having ,
While googling i came to know, either i can make use of NSAlert or Growl , any other application that i should think.
There is no default alternatives to the Windows popup message on the Mac, but the de facto standard for doing this is through Growl. NSAlert popup messages are usually used to display exactly those: alerts. They are often to large and cumbersome to display small amounts of information well without distracting or interrupting the user. Growl, on the other hand, works well for things like these, and is what you should use.

How to make MDIForms in objective c?

I need to have multiple windows on main window. same as MDIForms. That means having parent and child relationship between main window and other windows.
But I am not getting how to implement this. can anyone help me for this...
Have you read the Window Programming Guide for Cocoa?
In essence, Apple's opinion of MDI is...
"The MDI tendency directly contradicts
Mac OS X, in which windows are
document-centric rather than
application-centric. No parent
application "main window" exists--the
menubar and other interface elements,
like palettes, are used to constantly
indicate which application is active.
Document windows are only constrained
by the user's desktop size (which
might span single screen or multiple
monitors)."
Taken from Apple's Switch to Mac OS X developer document (see the "Mac OS X Doesn't Use MDI" section). Whilst this is quite an old document, nothing has changed in this respect.