Running NVDA screen-reader on a single application? - screen-readers

I know that's not the primary use or intended behavior of NVDA, but as a developer it would be amazing to be able to limit NVDA readout to a single window/application.
In its current state I'm forced to close and relaunch NVDA every time I switch between browser and VSCode to make some rapid changes and test.
Or maybe someone has an idea on how to efficiently deal with Screenreader testing in real-time while developing?

Related

C++ Trapping system dialogs in a kiosk system

We have a kiosk system running on Win7 with application written using VS2010 C++. As with kiosk systems, the system is locked down so that the user cannot access the windows system itself, but must do all work using our application.
Unfortunately, we have had one issue so far where a windows system-level dialog has popped up requiring a response. It popped up behind the GUI of our application, so that the user didn't even know it was there, and since it was modal, it blocked further use of the system.
These dialog was the well-known "system needs to be restored" dialog. Since this is a kiosk system, we are wanting to find a way to handle these types of situations in an automated fashion.
I have looked into setting a low level hook using SetWinEventHook() to capture EVENT_SYSTEM_ALERT events. The first problem of course is that I am not sure how to test this, since these events are not common. The second problem is that I am not sure how to handle the information, since there could be a number of different system alert events that pop up modal windows, and so automating a response might get us into more trouble than we might foresee.
My real question here is, if you were in this exact situation, what would be your line of attack. I am concerned I may be going about this the wrong way by trying to capture alerts and somehow automate a response to the resulting system alert window.
Any clues as to a useful direction here would be much appreciated.

Isis2 in ns-3 and bridge tap

So I need to simulate Isis2 in ns-3. (I am also to modify Isis2 slightly, wrapping it with some C/C++ code since I need at least a quasi real-time mission-critical behavior)
Since I am far from having any of that implemented it would interesting to know if this is a suitable way of conduct. I need to specifically monitor the performance of the consensus during sporadic wifi (ad hoc) behavior.
Would it make sense to virtualize a machine for each instance of Isis2 and then use the tap bridge( model and analyze the traffic in the ns-3 channel?
(I also am to log the events on each instance; composing the various data into a unified presentation)
You need to start by building an Isis2 application program, and this would have to be done using C/CLI or C++/CLI. C++/CLI will be easier because the match with the Isis2 type system is closer. But as I type these words, I'm trying to remember whether Mono actually supports C++/CLI. If there isn't a Mono compiler for C++/CLI, you might be forced to use C# or IronPython. Basically, you have to work with what the compiler will support.
You'll build this and the library on your mono platform and should test it out, which you can do on any Linux system. Once you have it working, that's the thing you'll experiment with on NS/3. Notice that if you work on Windows, you would be able to use C++/CLI (for sure) and then can just make a Windows VM for NS3. So this would mean working on Windows, but not needing to learn C#.
This is because Isis2 is a library for group communication, multicast, file replication and sharing, DHTs and so forth and to access any particular functionality you need an application program to "drive" it. I wouldn't expect performance issues if you follow the recommendations in the video tutorials and the user manual; even for real-time uses the system is probably both fast enough and steady enough in its behavior.
Then yes, I would take a virtual machine with the needed binaries for Mono (Mono is loaded from DLLs so they need to be available at the right virtual file system locations) and your Isis2 test program and run that within NS3. I haven't tried this but don't see any reason it wouldn't work.
Keep in mind that the default timer settings for timeout and retransmission are very slow and tuned for running on Amazon AWS, inside a data center. So once you have this working, but before simulating your wifi setup, you may want to experiment with tuning the system to be more responsive in that setting. I'm thinking that ISIS_DEFAULTTIMEOUT will probably be way too long for you, and the RTDELAY setting may also be too long for you. Amazon AWS is a peculiar environment and what makes Isis2 stable in AWS might not be ideal in a Wifi setting with very different goals... but all of those parameters can be tuned by just setting the desired values in the Environment, which can be done in bash on the line that launches your test program, or using the bash "Export" command.

Replicating dexpot functionality

I am developing a virtual desktop application and have been an avid dexpot user for some time. I've been reading the Win32 documentation, specifically the CreateDesktop and SwitchDesktop functions. From what I understand, only one desktop can be viewed at a time, yet dexpot manages to show a real time view of all active desktops in its full screen preview mode. Does anyone know a way of possibly implementing this? My first idea is to rapidly switch desktops, but this would use up far too much processing power.
The most difficult part about what you want to do is application switching. You cannot move an application instance from one Desktop object to another. I would base my implementation off of remote desktop applications. There's plenty of open source clients you can look into for some ideas. I would look into the desktop duplication api as well. One idea that comes to mind is making one large desktop, locking the mouse and view to one particular region, and using desktop duplication to show all the split up regions as separate desktops. That's assuming desktop duplication works as I think it does. I'm not sure as I don't use windows.

Load testing GUI application

We are developing a PC application that runs on Windows.
What would be a good approach for the developers to get some kind of load testing done before it goes to Test? -
Using an already existing tool for GUI testing like Selenium? Any other easy to use tool? Our code is in C++ (Open GL) on Windows.
Add a test stub within our code to simulate a load of the events that would get generated every time a button is clicked.
Use of a run time memory leak tool like Purify Plus or drmemory
We are developers and are primarily looking at some bare minimum load tests before the test team runs extensive tests.
Is a combination of #2 and #3 or just #3 helpful for this?
Please let me know if you have any other comments..
So you typically don't load test desktop applications unless that application is making calls to your server (in that case you would be load testing the sever).
I've never seen a desktop application which isn't able to handle user load on a single desktop. Unless you are querying a db on the user's desktop and need to worry about loading a massive amount of data and pegging the CPU, you should be fine.
When programming in C/C++, I've found GNU gprof invaluable in building a program which successfully utilizes the CPU's cache. GNU gprof is really invaluable beacuse it will provide you with the flat profile tool, which will give you the total execution time spent in each function and its percentage of the total running time, along with function call counts.
For UI desktop application testing, these two tools are really great and have been recommended by Joel (from Joel on Software):
TestComplete
Sikuli
You can learn more about about GNU gprof here.
Both Silk Performer and Load Runner offer GUI load testing support. I've used both and have ran up to 250 Virtual User loads which have simulated a few thousand users per/day. I've sometimes have run into applications where all protocol level load testing tools don't support the applications and the GUI approach works great. I've also been learning to Selenium with JMeter to run the GUI load tests but getting the selenium script to be reliable has been very difficult. If you run into application that don't need huge amounts of users you'll find the GUI approach to be much faster and sometime more accurate than the protocol based approach.

Running background services on a PocketPC

I've recently bought myself a new cellphone, running Windows Mobile 6.1 Professional. And of course I am currently looking into doing some coding for it, on a hobby basis. My plan is to have a service running as a DLL, loaded by Services.exe. This needs to gather som data, and do som processing at regular intervals (every 5-10 minutes).
Since I need to run this at regular intervals, it is a bit of a problem for me, that the system typically goes to sleep (suspend) after a short period of inactivity by the user.
I have been reading all the documentation I could find on MSDN, and MSDN blogs about this subject, and it seems to me, that there are three possible solutions to this problem:
Keep the system in an "Always On"-state, by calling SystemIdleTimerReset periodically. This seems a bit excessive, and is therefore out of the question.
Have the system periodically waken up with CeRunAppAtTime, and enter the unattended state, to do my processing.
Use the unattended state instead of going into a full suspend. This would be transparent to the user, but the system would never go into sleep.
The second approach seems to be preferred, however, this would require an executable to be called by the system on wake up, with the only task of notifying my service that it should commence processing. This seems a bit unnecessary and I would like to avoid this extra executable. I could of course move all my processing into this extra executable, but I would like to use some of the facilities provided when running as a service, and also not have a program pop up (even if its in the background) whenever processing starts.
At first glance, the third approach seems to have the same basic problem as the first. However, I have read on some of the MSDN blogs, that it might be possible to actually conserve battery consumption with this approach, instead of going in and out of suspend mode often (The arguments for this was that the nature of the WM platform is to have a very little battery consumption, when the system is idle. And that going in and out of suspend require quite a bit of processing).
So I guess my questions are as following:
Which approach would you recommend in my situation? With respect to keeping a minimum battery consumption, and a nice clean implementation.
In the case of approach number two, is it possible to eliminate the need for a notifying executable? Either through alternative API functions, or existing generic applications on the platform?
In the case of approach number three, do you know of any information/statistics relevant to the claim, that it is possible to extend the battery lifetime when using unattended mode over going into suspend. E.g. how often do you need to pull the system out of suspend, before unattended mode is to be preferred.
Implementation specific (bonus) question: Is it necessary to regularly call SystemIdleTimerReset to stay in unattended mode?
And finally, if you think I have prematurely eliminated approach number one, please tell me why.
Please include in your response whether you base your response on knowledge, or are merely guessing (the latter is also very welcome!).
Please leave a comment, if you think I need to clarify any parts of this question.
CERunAppAtTime is a much-misunderstood API (largely because of the terrible name). It doesn't have to run an app. It can simply set a named system event (see the description of the pwszAppName parameter in the MSDN docs). If you care to know when it has fired (to lat your app put the device to sleep again when it's done processing) simply have a worker thread that is doing a WaitForSingleObject on that same named event.
Unattended state is often used for devices that need to keep an app running continuously (like an MP3 player) but conserve power by shutting down the backlight (probably the single most power consuming subsystem).
Obviously unattended mode uses significantly more powr than suspend, becasue in suspend the only power draw is for RAM self-refresh. In unattended mode the processor is stuill powered and running (and several peripherals may be too - depends on how the OEM defined their unattended mode).
SystemIdleTimerReset simply prevents the power manager from putting the device into low-power mode due to inactivity. This mode, whether suspended, unattended, flight or other, is defined by the OEM. Use it sparingly because when your do it impacts the power consumption of the device. Doing it in unattended mode is especially problematic from a user perspective because they might think the device is off (it looks that way) but now their battery life has gone south.
I had a whole long post detailing how you shouldn't expect to be able to get acceptable battery life because WM is not designed to support what you're trying to do, but -- you could signal your service on wakeup, do your processing, then use the methods in this post to put the device back to sleep immediately. You should be able to keep the ratio of on-time-to-sleep-time very low this way -- but as you say, I'm only guessing.
See also:
Power-Efficient Apps (MSDN)
Power To The People (Developers 1, Developers 2, Devices)
Power-Efficient WM Apps (blog post)