Jump to content



Photo

[JAVA] pixelChecksum return always 0.0


  • Please log in to reply
1 reply to this topic

#1 pl4n3

pl4n3

    Seeker

  • New Members
  • 2 posts

Posted 10 June 2012 - 10:31 AM

Hello AutoIt Community,

I have a problem. Pixelchecksum does not work right for me.
I've written a script in AutoIt and this works well.
But if I want to implement the same in Java it doesnt work because
pixelchecksum always returns "0.0".

I use Jacob to access the com activex object

my program looks like this:

Mainclass:
private AutoItX x; ... checksum[0] = x.iniRead(ini, "Checksum", "test", "0"); if(checksum[0].equals("0")) { checksum[0]=String.valueOf(x.pixelChecksum(wposx+385, wposy+382, wposx+389, wposy+86, 1)); x.iniWrite(ini, "Checksum", "test", checksum[0]); } ...

AutoItx class:
...   public double pixelChecksum(int left, int top, int right, int bottom, int step)   {     Variant vLeft = new Variant(left);     Variant vTop = new Variant(top);     Variant vRight = new Variant(right);     Variant vBottom = new Variant(bottom);     Variant vStep = new Variant(step);     Variant[] params = { vLeft, vTop, vRight, vBottom, vStep };     Variant result = this.autoItX.invoke("PixelChecksum", params);     return result.getDouble();   } ...


result.getDouble() is alway 0.0
what am I doing wrong?

Edited by pl4n3, 10 June 2012 - 10:31 AM.






#2 pl4n3

pl4n3

    Seeker

  • New Members
  • 2 posts

Posted 10 June 2012 - 03:34 PM

[SOLVED]

wposx+389, wposy+86

right: wposx+389, wposy+386

:/

~pl4n3

Edited by pl4n3, 10 June 2012 - 03:37 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users