Is it possible to switch input language for another application? Having application's process ID, thread ID, window handle etc.
Maybe LoadKeyboardLayout and ActivateKeyboardLayout ?
I think it's been asked before.
Is there a WinXP/WinXP Embedded API to change Locale (specifically, IME)?
Though it is Windows Embedded, the API is probably the same or similar.
http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx
Related
I have a test case which requires me to first change the system's locale and then start the test. I want to automate the process of changing the system locale with qtp/uft, is that possible?
Can UFT/QTP automate the change of the system locale on a window machine?
Yes you can. At the start (or other appropriate point) of your test use SetLocale(lcid) like this:
SetLocale("en-gb") ' sets locale to UK
SetLocale("en-us") ' sets locale to US
SetLocale("de") ' sets locale to Germany
This link will show you the various lcids available for use
The WINAPI SetThreadLocale might be a way of doing that, with the restriction that only the processes started by UFT will inherit it (You need to make sure that your AUT is a child process of UFT). You can use WINAPI functions via the Extern.Declare headers.
We should not forget that such practices are considered malware - doesn't matter the honest purpose - so if you really want to stay clean, make your work transparent, comply to security rules; and most of all, you have UFT - do it via the GUI as the normal user would do it.
we have just added Application Insights to our WebAPI 2.2 application and it looks like a winner.
However, we have some controllers that receive sensitive information that we cannot store due to compliance regulations, even in Application Insights. We want to capture information level trace events on some of our controllers, but we need to not capture or obscure the information when sent through other controllers. Can anyone suggest a way that we can achieve that?
Since you're using the Microsoft.ApplicationInsights.TraceListener package, I don't think there's any way to directly filter the data. If you can add something special to the Trace.WriteXxx() call, then one option might be to implement a TraceFilter and register it through your configuration for the ApplicationInsights Trace Writer.
Then in your TraceFilter.ShouldTrace(), you could check for that special value (maybe it's the event ID, maybe some prefix in the trace message, or something like that) and simply return false to cause it to be skipped.
I asked the same question on the Azure MS website and got a reply that works well.
Anyone looking here for an answer should look there.
https://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/#comment-2309233065
I have the following question:
I have an application that I'm using Marionette.Layout and this Layout has regions.
I want to add the option to the user to change language(on run time), meaning after the application is already render and the user is working, he can change the language and all the application should be change it to the selected language.
My Question:
1. I need to 'refresh/re-render' all the application, how is this done, I didn't found or I miss it, how to re-render the application?
I already have a a mechanism that the 'templates' are like:
https://github.com/janl/mustache.js/issues/216
This is working when the application is started, the first time, I need on run time to re-render/refresh with the new data
Unfortunately there isn't anything in the Marionette to do this for you. You will have to write the code to re-render the entire application with the new language setting, yourself.
I am very new to Oracle Policy Automation. I am developing a screen which will give the option to the user to select languages. Based on his/her selection, the next screen should display a welcome message in the language selected.
I have two properties files (one for each language) and I have placed them inside the /classes/configuration folder.
Now, my query is how to invoke these properties files based on user selection and what should I write in the label field so that the messages are dynamically picked up.
Thanks in advance for the help.
I guess you may have figured this out by now.
In OPA the locale has to be set at the start of an interactive session (part of the start investigation URL) and cannot be changed subsequently. The locale specific resource files under configuration will then be used.
Your locale selection screen would probably need to be outside of OPA triggering a session start of the correct type. If you are using OWD then it will actually provide it's own locale selection screen if you try to access a rulebase without specifying the locale to use. We are working on some additional tooling around OWD to make this process a lot more straightforward
On a related note to this question, say I've got an file with an handler defined, how would I programatically invoke the registered handler? Don't necessarily need the actual code to do this, just a pointer to some docs or the terminology to google for this.
Thanks,
Chris
It is sufficent to start a new process specifying the file you want to open with the default application - the rest is handled by Windows. In C# this is done as follows.
Process.Start("Foo.jpg");
This will open the image using the default application for JPEG images.
There's the ShellExecute function and its advanced cousin, ShellExecuteEx.