Opened 12 years ago
Closed 12 years ago
#2689 closed Bug (Fixed)
_ScreenCapture_Capture Error
| Reported by: | Owned by: | guinness | |
|---|---|---|---|
| Milestone: | 3.3.11.4 | Component: | Standard UDFs |
| Version: | Other | Severity: | None |
| Keywords: | Cc: |
Description
_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/
Attachments (0)
Change History (2)
comment:1 by , 12 years ago
| Version: | → Other |
|---|
comment:2 by , 12 years ago
| Milestone: | → 3.3.11.4 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [9974] in version: 3.3.11.4

Automatic ticket cleanup.