Jump to content

Recommended Posts

Posted

Hi,

I'm trying to download this library, but the link on page one seems to be invalid.

Can someone please point me to the correct url?

Thanx in advance.

Greetings,

Roger

Seems to work fine for me. Are you sure the problem isn't on your end?
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

No response from spyro, so I guess I'll appeal to the masses. If anyone is having a problem with the ScreenCap module, PLEASE post enough information so that I can debug the problem. To date I have had two reports of errors in _API_GetCursorInfo that I can not replicate on any of the machines that I have. It appears that this is only happening for a few select users. Here is what I need to know:

* Does the problem appear when you run the demo script?

* If you write a script that just calls _API_GetCursorInfo, does it fail?

* What version of OS and language are you using?

I've been sick for a few days and was unable to respond.

* Does the problem appear when you run the demo script? Yes

* If you write a script that just calls _API_GetCursorInfo, does it fail? Yes

* What version of OS and language are you using? WindowsXP SP2 in VMware with AutoIt 3.2.0.1

www.SecurityDistro.com

Posted

I've been sick for a few days and was unable to respond.

* Does the problem appear when you run the demo script? Yes

* If you write a script that just calls _API_GetCursorInfo, does it fail? Yes

* What version of OS and language are you using? WindowsXP SP2 in VMware with AutoIt 3.2.0.1

OK, now we're getting somewhere. I'm assuming that you're using the English version of WinXP. If you change _API_GetCursorInfo to:

Func _API_GetCursorInfo()
  Local $iCursor, $pCursor, $tCursor, $aResult, $aCursor[5]

  $tCursor = __tagCURSORINFO()
  $pCursor = _tagGetPtr ($tCursor)
  $iCursor = _tagGetSize($tCursor)
  _tagSetData($tCursor, "Size", $iCursor)
  $aResult = DllCall("User32.dll", "int", "GetCursorInfo", "ptr", $pCursor)
  $aCursor[0] = $aResult[0] <> 0
  $aCursor[1] =            _tagGetData($tCursor, "Flags"   ) <> 0
  $aCursor[2] = "0x" & Hex(_tagGetData($tCursor, "hCursor"))
  $aCursor[3] =            _tagGetData($tCursor, "X"       )
  $aCursor[4] =            _tagGetData($tCursor, "Y"       )
  Return $aCursor
EndFunc
The error goes away, but does the cursor get captured when you run the demo. I'm trying to figure out if the returned value from GetCursorInfo is wrong or if it's truly failing.
Auto3Lib: A library of over 1200 functions for AutoIt
Posted (edited)

OK, now we're getting somewhere. I'm assuming that you're using the English version of WinXP. If you change _API_GetCursorInfo to:

Func _API_GetCursorInfo()
  Local $iCursor, $pCursor, $tCursor, $aResult, $aCursor[5]

  $tCursor = __tagCURSORINFO()
  $pCursor = _tagGetPtr ($tCursor)
  $iCursor = _tagGetSize($tCursor)
  _tagSetData($tCursor, "Size", $iCursor)
  $aResult = DllCall("User32.dll", "int", "GetCursorInfo", "ptr", $pCursor)
  $aCursor[0] = $aResult[0] <> 0
  $aCursor[1] =            _tagGetData($tCursor, "Flags"   ) <> 0
  $aCursor[2] = "0x" & Hex(_tagGetData($tCursor, "hCursor"))
  $aCursor[3] =            _tagGetData($tCursor, "X"       )
  $aCursor[4] =            _tagGetData($tCursor, "Y"       )
  Return $aCursor
EndFunc
The error goes away, but does the cursor get captured when you run the demo. I'm trying to figure out if the returned value from GetCursorInfo is wrong or if it's truly failing.
If I paste in what you supplied and then run the demo script I get an error which is attached.

post-15247-1170773624_thumb.jpg

Edited by spyro

www.SecurityDistro.com

Posted (edited)

If I paste in what you supplied and then run the demo script I get an error which is attached.

Sorry. Should have been more verbose. The problem isn't with the ScreenCap function, it's with _API_GetCursorInfo. Just write a small script that calls the new _API_GetCursorInfo and prints out the results of the array it returns. Also, are you sure you're not running this under a 95 or NT VM session? GetCursorInfo is not supported on these systems. Edited by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

Sorry. Should have been more verbose. The problem isn't with the ScreenCap function, it's with _API_GetCursorInfo. Just write a small script that calls the new _API_GetCursorInfo and prints out the results of the array it returns. Also, are you sure you're not running this under a 95 or NT VM session? GetCursorInfo is not supported on these systems.

Paul:

I just downloaded the latest version of A3L becuase i would like to use the screen capture module (and possibly some others, i've got a pesky listbox i can't seem to read :-|). I receive the exact same errors as spyro.

That is to say..

If i just run the Example ScreenCap.au3 (after moving the include files into a directly which is in the search path)

Or if i modify it to this:

_ScreenCap_Capture("c:\part1.bmp", 0, 0, 300, 400, true)

I receive an error box that says:

_API_GetCursorInfo: Invalid access to memory location.

This happens on my XP Pro SP2 box (OS Build 5.1.2600.0053), AND on my Win2000 SP4 box (OS Build 5.00.2195.0004).

Now.. this seems to be related to the cursor, so if i modify the function call to not include the cursor:

_ScreenCap_Capture("c:\part1.bmp", 0, 0, 300, 400, false)

I now receive an error in Autoit, like spyro's above:

A3LWinAPI.au3 (3051) : ==> Subscript used with non-Array variable.: 
Return SetError(_API_GetLastError(), 0, $aResult[0]<>0) 
Return SetError(_API_GetLastError(), 0, $aResult^ ERROR

Once again, this happens on both machines (and i have about 20 other machines running Win2k SP4 i could test on, but assume iw ould get the same output).

If i modify _API_GetCursorInfo() as per your notes above, i no longer get the API error even if i ask for the cursor, however i still always receive the Subscript error.

Any ideas? Does this latest version work for anyone? :whistle:

Thanks!

Quasar

Posted

Alright, i figured out what all the problems are..

In order for this latest version of A3L to work, you MUST have the latest release of AutoIt.

That is, it fails under v3.2.0.1 but works under v3.2.2.0.

This solved the problem on both the XP SP2 machine and the 2K SP4 machine(s).

Sorry for the post, but i hope this helps someone else!

Quasar

Posted

Alright, i figured out what all the problems are..

In order for this latest version of A3L to work, you MUST have the latest release of AutoIt.

That is, it fails under v3.2.0.1 but works under v3.2.2.0.

This solved the problem on both the XP SP2 machine and the 2K SP4 machine(s).

Sorry for the post, but i hope this helps someone else!

Quasar

@Quasar Jarosz: Thank you for following up on this. I sincerely appreciate the extra effort. Hopefully, this will fix Sypro's problem as well. Sypro, are you out there?
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

PaulIA:

I have also noticed something a little odd with _ScreenCap_Capture() to catpure a partial image.

Running the example ScreenCap.au3 yeilds a file (c:\part1.bmp) which is not quite right. The left-most column of pixels appears to have been wrapped around from the right (ie, it should probly be the right-most column of pixels), and the bottom lefthand pixel is always black (this is the real problem for me, becuase im taking an image of a white area so the wrap-around isn't hurting, but the black pixel at the bottom left is :whistle:)

I have attached an example.

What do you think?

Thanks!

Oh, and this occurs on both of my machines.

part1.zip

Posted

@Quasar Jarosz: Thank you for following up on this. I sincerely appreciate the extra effort. Hopefully, this will fix Sypro's problem as well. Sypro, are you out there?

I'm here. I will update to the latest version and give it a try. Thanks for fix.

www.SecurityDistro.com

Posted

PaulIA:

I have also noticed something a little odd with _ScreenCap_Capture() to catpure a partial image.

Running the example ScreenCap.au3 yeilds a file (c:\part1.bmp) which is not quite right. The left-most column of pixels appears to have been wrapped around from the right (ie, it should probly be the right-most column of pixels), and the bottom lefthand pixel is always black (this is the real problem for me, becuase im taking an image of a white area so the wrap-around isn't hurting, but the black pixel at the bottom left is :whistle:)

I have attached an example.

What do you think?

Thanks!

Oh, and this occurs on both of my machines.

You are indeed correct. There are actually a couple of bugs in _ScreenCap_SaveBitmap. I have put a patch file for the Screen_Cap module on the first page of this thread until I release the next version. I'm working on a major change for the next release and the library is literally in a thousand pieces right now... :)

I would appreciate it if you would let me know if this patch solves the problem. Thanks again for the help.

Auto3Lib: A library of over 1200 functions for AutoIt
Posted

Hi,

Is there an "AutoIt Help" like documentation expeted ?

Otherwise good stuff, this library respond for some of my idea i didn't found in help :whistle:

Tx

Posted

Hi,

Is there an "AutoIt Help" like documentation expeted ?

Otherwise good stuff, this library respond for some of my idea i didn't found in help :whistle:

Tx

I have been working on this for the last few weeks. I have used the AutoIt help file as a template, using the same format and style so that it will be easy for AutoIt users. Due to the sheer size of the library, it will probably be released in stages. I have not set a firm date for when the next release will be, but probably in a few weeks.
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

I have been working on this for the last few weeks. I have used the AutoIt help file as a template, using the same format and style so that it will be easy for AutoIt users. Due to the sheer size of the library, it will probably be released in stages. I have not set a firm date for when the next release will be, but probably in a few weeks.

maybe you should share the task and let people help you. You could then review those parts and merge it with your docs. I'm sure there are a few people here who are willing to help....

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

maybe you should share the task and let people help you. You could then review those parts and merge it with your docs. I'm sure there are a few people here who are willing to help....

Cheers

Kurt

It's not so much the text that's the problem. I wrote an automated help file generator that generates the help file by parsing the Auto3Lib source code. The tedious part is writing the examples for a library with over 1,000 functions. :whistle: I want to write something more than a "one liner" for the functions so that users have a fully working piece of code. It's just going to take some time. I'll probably roll out the first edition with all of the functions documented, but not all of the examples in place.
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

It's not so much the text that's the problem. I wrote an automated help file generator that generates the help file by parsing the Auto3Lib source code. The tedious part is writing the examples for a library with over 1,000 functions.

Ah, I see...

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

I have been working on this for the last few weeks. I have used the AutoIt help file as a template, using the same format and style so that it will be easy for AutoIt users. Due to the sheer size of the library, it will probably be released in stages. I have not set a firm date for when the next release will be, but probably in a few weeks.

Hi PaulIA

You are not only "API Extremist" but also Auto3Lib extremist :whistle:

So much work from one man! Great.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...