jarciu00

Please help me with the pixelchecksum

5 posts in this topic

Hello, first of all I'd like to say that I'm totally newbie and I want to create a script, which would capture a part of my screen and if some pixel there change, he will insert some keys. I've tried to do that with function pixelchecksum but I don't know how to do that. I started with the following code:

Local $iCheckSum = PixelChecksum(1418, 367, 1586, 426)

I don't know how to manage with if not command in this case. I tried also use this:

controlsend("", "", "", "(ctrldown)(l)(ctrlup)")

but it doesn't work also.

Please help me :)

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

If you could tell us which program you try to automate we could suggest the best solution. Pixel* functions are slow and not very reliable.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
44 minutes ago, jarciu00 said:

controlsend("", "", "", "(ctrldown)(l)(ctrlup)")

Just for the record: You need curly brackets around CTRLDOWN and CTRLUP.
The helpfile is your friend.

Also ensure you read our forum rules to get yourself familiarized with them!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Local $iCheckSum = PixelChecksum(1418, 367, 1586, 426)

While 3
    If PixelChecksum(1418, 367, 1586, 426) <> $iCheckSum Then
        MsgBox(0, "message", "region changed")
    EndIf
    Sleep(333)
WEnd

 


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

I'm using autoit v3. Thank you guys for all the replies. I've changed the brackets and used the script from above and now it's working. Thanks!

Local $iCheckSum = PixelChecksum(1418, 367, 1586, 426)

While 3
    If PixelChecksum(1418, 367, 1586, 426) <> $iCheckSum Then
        controlsend("", "", "", "{ctrldown}{l}{ctrlup}")
    EndIf
    Sleep(333)
WEnd

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now