According to FSDN, the FindWindow function returns a handle, so off hand I would think you should be assigning it's return value to a variable, and maybe that's causing a form of compilation error that's not being explained to you perfectly? Stay well Jacob Kruger jacob.kruger@xxxxxxxxxxxx -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Cearbhall O'Meadhra Sent: Tuesday, September 01, 2009 2:48 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: Compile problem Hello, Can anyone tell me why I get the following error message saying: "Compile Error Expected hCurrentWindow to be a variable of type int not handle " When I compile the following script: Script ListOfResults () var handle hCurrentWindow Let hCurrentWindow = GetFocusWindow () FindWindow (hCurrentWindow, "sysListview32", "") LeftMouseButton() EndScript All the best, Cearbhall Meeting the Leadership Challenge T:(01) 2864623 M: 083 33 234 87 E: cearbhall.omeadhra@xxxxxxx __________? Visit and contribute to The JAWS Script Repository http://jawsscripts.com View the list's information and change your settings at //www.freelists.org/list/jawsscripts No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 09/01/09 06:52:00 __________ Visit and contribute to The JAWS Script Repository http://jawsscripts.com View the list's information and change your settings at //www.freelists.org/list/jawsscripts