﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2689	_ScreenCapture_Capture Error	someonecool12@…	guinness	"_ScreenCapture_Capture crashes when computer is locked or no mouse is connected.

The error received is:
""C:\Program Files (x86)\AutoIt3\Include\ScreenCapture.au3"" (60) : ==> Subscript used on non-accessible variable.:
If $aCursor[1] Then
If $aCursor^ ERROR

To reproduce the problem, use this code and lock the computer
{{{
#Include <ScreenCapture.au3>
Sleep(10000)
;Lock your workstation during the sleep
_ScreenCapture_Capture(""C:\test.jpg"")
}}}

Changing line 60 to the following solves the problem:
{{{
If @error = 0 And $aCursor[1] Then
}}}

I noticed that Bug 1040 had added some error handling, but it was removed. I wasn't sure if I should re-open Bug 1040 for this.
http://www.autoitscript.com/trac/autoit/ticket/1040

Forum discussion:
http://www.autoitscript.com/forum/topic/160026-screencapture-capture-error/"	Bug	closed	3.3.11.4	Standard UDFs	Other	None	Fixed		
