Jump to content

Johnx

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Location
    ...
  • WWW
    ...
  • Interests
    ...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Johnx's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. mLipok you genius! right! the problem is linked to the screen's settings (zoom and resolution), thanks you all for the support! = D
  2. BrewManNH did you tryed the script on different parts of the screen? I noticed that the error is more evident on the increasing of coordinates on both axis; if I take the area on the top left of the screen it seem to work well, if I take an area at te right or the bottom of the screen it totally wrong the area to take
  3. I know! my problem is not "how to make a correct script", "how theese functions work"... I really don't know how to solve it! most because I don't know where/what is the problem; even the most easy script like this one doesn't work properly I hope for someone that can give me a hand on this, the alternative is to find another tool like autoit, even if I realy enjoy it 'couse is so easy, cool and usefull
  4. #include <MsgBoxConstants.au3> MsgBox(0, "area","_") $x1 = MouseGetPos() MsgBox(0, "2","_") $x2 = MouseGetPos() while 1 $iCheckSum = PixelChecksum($x1[0], $x1[1], $x2[0], $x2[1]) While $iCheckSum = PixelChecksum($x1[0], $x1[1], $x2[0], $x2[1]) Sleep(100) WEnd MsgBox(0, "yes","_") $iCheckSum = 0 WEnd
  5. in this case the computer says correctly yes or no if there is or not the image in the screen, but when it finds the image it returns in x1 and y1 2 wrong locations
  6. like this? in this case I take 2 points on the screen and I use the cheksum in the chosen area, I move some folders on the screen until it says that something changed, however everytime it checks a wrong and apparently random area of the screen, smaller the area, more evident the error
  7. I hope for someone that can help me -__- for this problem I can only use properly MouseMove, MouseClick and for the other they work correctly only when I select all the screen (from 0,0 to the max screen-size)
  8. thanks! but the problem is another, as I sayed if I put: left 9 top 148 right 230 bottom 532 it doesn't search the pixel in the part of the screen from 9 to 230 X axis and from 148 to 532 Y axis I tryed this for example: __________________________ MsgBox(0,"go?","_") ; Wait until something changes in the region ; Get initial checksum Local $iCheckSum = PixelChecksum(993, 644, 1233, 783) ; Wait for the region to change, the region is checked every 100ms to reduce CPU load While $iCheckSum = PixelChecksum(993, 644, 1233, 783) Sleep(100) WEnd MsgBox(0, "Something in the region has changed!", "") ____________________ (I took this example from this site) but it find that something changed not in the region from (993, 644) to (1233, 783), (near the bottom at the right of the screen) but in a region near the center of the screen and this problem is in all fuctions that works with the screen, only the mousemove and mouseclick work
  9. this problem touch all functions where I need to search something on the screen, for example with PixelSearch if I write: $result = PixelSearch(10,0,100,300, $Color) the program search the pixel in a wrong area (not in the part of the screen defined from point (10, 0) to (100,300) ); if the computer find the correct color, it return coordinates that doesn't corrispond to nothing. I tryed also with PixelChecksum and in this case the computer searches if there are changes on the screen but in a wrong area ($result = PixelChecksum ($a1[0],$a1[1],$a2[0],$a2[1])) ( the syntax is PixelChecksum($x_of_point1, y_of_point1, $x_of_point2, $y_of_point2) ) a last example is with image search: it makes his duty searching an image in the screen, however it returns wrong coordinates: (example) #include <ImageSearch2015.au3> $x1=0 $y1=0 $result=0 MsgBox(0,"start","start") func start() $result = _ImageSearch("C:\folder\image.PNG", 1, $x1, $y1, 150, 0) if $result=1 Then MouseMove($x1,$y1,10) EndFunc
×
×
  • Create New...