# possible bug

## Recommended Posts

i include <ScreenCapture.au3>

and try to take 1 screenshot (no other includes).. This error pops up:

CODE
C:\AutoIt3\beta\Include\WinAPI.au3(562,70) : WARNING: $GENERIC_EXECUTE: possibly used before declaration. If BitAND($iAccess, 1) <> 0 Then $iDA = BitOR($iDA, $GENERIC_EXECUTE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(563,67) : WARNING:$GENERIC_READ: possibly used before declaration.

If BitAND($iAccess, 2) <> 0 Then$iDA = BitOR($iDA,$GENERIC_READ)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\AutoIt3\beta\Include\WinAPI.au3(564,68) : WARNING: $GENERIC_WRITE: possibly used before declaration. If BitAND($iAccess, 4) <> 0 Then $iDA = BitOR($iDA, $GENERIC_WRITE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(566,71) : WARNING:$FILE_SHARE_DELETE: possibly used before declaration.

If BitAND($iShare, 1) <> 0 Then$iSM = BitOR($iSM,$FILE_SHARE_DELETE)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\AutoIt3\beta\Include\WinAPI.au3(567,69) : WARNING: $FILE_SHARE_READ: possibly used before declaration. If BitAND($iShare, 2) <> 0 Then $iSM = BitOR($iSM, $FILE_SHARE_READ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(568,70) : WARNING:$FILE_SHARE_WRITE: possibly used before declaration.

If BitAND($iShare, 4) <> 0 Then$iSM = BitOR($iSM,$FILE_SHARE_WRITE)

##### Share on other sites

I can't use the ScreenCaputre include either.. I get the 'Vector[] Out of bounds' error... what a shame, such cool udf's

About your problem, I get that sometimes with other files. But they are just warnings, the script might still work fine.

##### Share on other sites

I get no errors when I run

#include <ScreenCapture.au3>

; Capture full screen
_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg")

; Capture region
_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image2.jpg", 0, 0, 796, 596)

and it saves both snap shots.

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

i include <ScreenCapture.au3>

and try to take 1 screenshot (no other includes).. This error pops up:

CODE
C:\AutoIt3\beta\Include\WinAPI.au3(562,70) : WARNING: $GENERIC_EXECUTE: possibly used before declaration. If BitAND($iAccess, 1) <> 0 Then $iDA = BitOR($iDA, $GENERIC_EXECUTE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(563,67) : WARNING:$GENERIC_READ: possibly used before declaration.

If BitAND($iAccess, 2) <> 0 Then$iDA = BitOR($iDA,$GENERIC_READ)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\AutoIt3\beta\Include\WinAPI.au3(564,68) : WARNING: $GENERIC_WRITE: possibly used before declaration. If BitAND($iAccess, 4) <> 0 Then $iDA = BitOR($iDA, $GENERIC_WRITE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(566,71) : WARNING:$FILE_SHARE_DELETE: possibly used before declaration.

If BitAND($iShare, 1) <> 0 Then$iSM = BitOR($iSM,$FILE_SHARE_DELETE)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\AutoIt3\beta\Include\WinAPI.au3(567,69) : WARNING: $FILE_SHARE_READ: possibly used before declaration. If BitAND($iShare, 2) <> 0 Then $iSM = BitOR($iSM, $FILE_SHARE_READ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\WinAPI.au3(568,70) : WARNING:$FILE_SHARE_WRITE: possibly used before declaration.

If BitAND($iShare, 4) <> 0 Then$iSM = BitOR($iSM,$FILE_SHARE_WRITE)

Those constants should be in the Constants.au3

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

I always get this:

What does it mean?

Apparently, the script pauses until I press Ok. When I do, I get this:

C:\Archivos de programa\AutoIt3\beta\Include\GDIPlus.au3 (2688) : ==> Subscript used with non-Array variable.:

Return $aResult[0] <> 0 Return$aResult^ ERROR

##### Share on other sites

I always get this:

What does it mean?

Apparently, the script pauses until I press Ok. When I do, I get this:

C:\Archivos de programa\AutoIt3\beta\Include\GDIPlus.au3 (2688) : ==> Subscript used with non-Array variable.:

Return $aResult[0] <> 0 Return$aResult^ ERROR

Means you can't start GDI+, it's failing the "GdiplusStartup" dll call

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

add the following line to the line after the dllcall (after line 2686) and see if it gives an explanation or anything

_WinAPI_Check ("_GDIPlus_Startup (GdiplusStartup)", @error, -1)

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

Ok, I get this after the Out of Bounds error:

Now, I downloaded GDIplus.dll and saved it in C:\Windows\System32. This is what I get when I try to register it:

If I run that little example you posted, I don't get any errors or warnings but it does nothing.

How come I can't register it?

##### Share on other sites

Ok, I get this after the Out of Bounds error:

Now, I downloaded GDIplus.dll and saved it in C:\Windows\System32. This is what I get when I try to register it:

If I run that little example you posted, I don't get any errors or warnings but it does nothing.

How come I can't register it?

Have you installed GDI+?

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

-edit-

Downloaded GDI+ from Microsoft's site, unzipped in the system32 directory and still nothing...

Edited by Nahuel

##### Share on other sites

-edit-

Downloaded GDI+ from Microsoft's site, unzipped in the system32 directory and still nothing...

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

Thank you so much for your help Gary. I went there and there only seems to be links for Server2003 and WinXP (I have Win2000)

I thought I'd try the one for Server2003 but I need to download many files and it says I need 342Mb free space... So I give up. Thanks again pal.

##### Share on other sites

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

That's exactly the one I downloaded before. But, I read the file redist.txt and this is what it says:

For Windows 2000, Windows Millennium Edition, Windows NT 4.0 and Windows 98, install gdiplus.dll into the private directory of the application not into the system directory.

So I saved the dll in C:\...\AutoIt\Beta\Include, tried to register the dll giving the full path, but still no success.

##### Share on other sites

That's exactly the one I downloaded before. But, I read the file redist.txt and this is what it says:

So I saved the dll in C:\...\AutoIt\Beta\Include, tried to register the dll giving the full path, but still no success.

This DLL needn't be registered because it doesn't contain COM support.

Just place it in Windows\System or System32 directory (or some directory listed in PATH)

I used this on my WIN98 with no problems.

Edited by Zedna

## Create an account

Register a new account