jarciu00 Posted February 18, 2017 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
water Posted February 18, 2017 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 2024-07-28 - Version 1.6.3.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 (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
Developers Jos Posted February 18, 2017 Developers 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.
JohnOne Posted February 18, 2017 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.
jarciu00 Posted February 18, 2017 Author 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
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