[jawsscripts] Re: Moving to window with a Hot key?

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 13 Nov 2016 15:01:09 -0500

This is a technical findings response to the request for a way to switch apps 
from a JAWS script.

I have played often with this concept, but we as scripters are a bit hampered 
by lack of access to Windows
functions intended for this action. Here are the things I've tried and their 
results, off the top of my head.
This list is certain not to be complete.

SetFocus() to set focus to an app's top-level window: Works in many cases but 
can fail to set focus and can
also cause focus to be lost if the new app is currently minimized.

Using MSAA to focus the window's Window or Client object: May work more often 
but is still subject to the
above caveat.

Using SendMessage or PostMessage messages to activate the window and deactivate 
the previous one: I've tried
several such sequences, but none worked every time and all are still subject to 
the minimized-destination-app
issue.

The JAWS SwitchToPreviousApp() function to switch to an app, the count for 
which would have to be derived from
something like the order of Taskbar icons perhaps: Seems not to work at all, at 
least in JAWS 17/18 and
Windows 8.1.

I also tried finding a way via various COM shell objects commonly available in 
Windows but found nothing
sufficient to do better than all of the above approaches.

I believe I even recently tried programmatic activation of the Alt+Tab task 
list so I could activate a task by
acting on an element in that list; but I seem to recall that failing also, 
though details currently elude me.

On Sun, Nov 13, 2016 at 02:52:56PM -0500, Jonathan Cohn wrote:
Definitely try above suggestion, but certainly you could create a script in the 
default.jss that gets a list of top level windows and searches through them. 
A couple of places I have thought of doing this, but did not:

1. JAWS Window List is an application but insert-F10 will not SetFocus/Activate 
that window if it is already open. 
2. Using the windows-2 to open Outlook 2013 always opens a new instance of 
Inbox instead of activating the existing Outlook window.

Also, on the Windows shortcut front windows-alt-number should bring up a menu 
in most cases.
 
                Best wishes,

Jonathan



On Nov 13, 2016, at 11:33 AM, Jeremy Richards <jeremy.richards7@xxxxxxxxx> 
wrote:

Pin the item or file to the Windows taskbar then use Windows+1, Windows +2, 
Windows+3 etc. to launch a new instance of that file or simply switch focus 
to it. 

Right now, press Windows key +T to place focus on the taskbar. Use your right 
arrow key to find something of interest such as File explorer. Track how many 
times you had to press the right arrow key, then press the Windows key with 
the numbered item. If you had to right arrow twice, then press windows key+2. 
If you had to arrow 3 times, press windows key+3. 

To pin items to the taskbar simply search for the item using the Start menu 
search box then right-click and press enter on "pin to taskbar." 

You can also move items around on the taskbar so they are in a more desirable 
order. 

JR
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of AccessibleTech ;.
Sent: Sunday, November 13, 2016 8:25 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Moving to window with a Hot key?

Hello Folks,

Is there any script that would activate a minimized window with a hot key? 
For example, If I am working on Internet explorer, and a notepad window is 
open in the background, then pressing ctrl+1 would move focus to that Notepad 
window.

I need this script for my work purposes, and I'm not allowed to install any 
third party software onto my work PC. However, I'm allowed to write scripts 
in Jaws script manager only.

Any help is appreciated.
Thanks
__________ 

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________???

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts



__________???

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:Doug.Lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: