Jump to content

Please help me with the pixelchecksum


jarciu00
 Share

Recommended Posts

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 :)

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

Link to comment
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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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