jarciu00 Posted February 18, 2017 Share Posted February 18, 2017 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 More sharing options...
water Posted February 18, 2017 Share Posted February 18, 2017 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted February 18, 2017 Developers Share Posted February 18, 2017 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 More sharing options...
JohnOne Posted February 18, 2017 Share Posted February 18, 2017 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 More sharing options...
jarciu00 Posted February 18, 2017 Author Share Posted February 18, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now