Hi Don, thank you so much for your help. I have used event functions before but not in JAWS scripts. You are right, maybe I am confused by the FSDN descriptions but maybe I did not explain myself clearly. The window I am dealing with is the main and only window for the application. Therefore, how will I know the previous window handle when the application is started and the window handle that becomes active if the user closes the application or moves away by pressing ALT+TAB or starts another application? I presume that as nother script file will then have been started each time a new application gets focus. I am sorry if I wasted your time by giving insufficient information but I wanted to keep my question short. many thanks, chris Edwards ----- Original Message ----- From: "Don Marang" <donald.marang@xxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Tuesday, September 28, 2010 10:08 PM Subject: [jawsscripts] Re: Activating A Function When A Window Gets And Loses Focus > Look in the FSDN documentation at the TetherJAWSToPC and the > FocusChangedEvent functions. If you have not used event functions before, > it may seem confusing. Basically, JAWS will call these event functions > each > time that action is triggered. In this case, every time the focus changes > from one window to another, such as the user pressing Tab. You can create > your own version of the event handler which will get called instead of the > normal JAWS actions. The number and type of parameters must match. This > allows you to perform special actions when those events occur. In your > case, you will want to check if the window handle is the appropriate > window. > Fortunately, both the window that previously had the focus and the window > getting the focus are provided to you in the parameters. Most likely, > your > special event handler should call the same event handle before it > finishes. > This will allow the normal JAWS things to still happen. > > > Don Marang > > There is just so much stuff in the world that, to me, is devoid of any > real > substance, value, and content that I just try to make sure that I am > working > on things that matter. > Dean Kamen > > > -------------------------------------------------- > From: "Christopher Edwards" <edwardsc2007@xxxxxxxxxxxxxx> > Sent: Tuesday, September 28, 2010 4:08 PM > To: <jawsscripts@xxxxxxxxxxxxx> > Subject: [jawsscripts] Activating A Function When A Window Gets And Loses > Focus > >> Hello, >> >> I have not posted anything to this list since re-joining but thanks to >> everyone for all the knowledge I have gained from reading your posts. I >> have >> written scripts for my own use but have now been asked to write something >> for someone else. What I have done so far works well but to make it even >> better I would like to set the Jaws cursor to follow the PC Cursor when >> the >> application gets focus and be set to no longer follow the PC cursor when >> the >> focus is moved to another window. Is this possible? I have ploughed >> through >> the documentation and probably missed the obvious but if you can give me >> any >> clues I would appreciate it very much. >> >> Many thanks, >> >> Chris edwards >> >> >> __________� >> >> 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