CrazyMob Posted February 16, 2021 Posted February 16, 2021 Func Reconnect() Do Sleep(50) Until PixelGetColor (1083, 702) = 0x00EB39 If PixelGetColor (1083, 702) = 0x00EB39 Then Sleep(60000) If PixelGetColor (1083, 702) = 0x00EB39 Then Sleep(50) Relogin() i have a function in my script and i want that it work only when If PixelGetColor (1083, 702) = 0x00EB39 Then and if the pixelgetcolor is not match i want it to ignore it whats wrong here please help ))
water Posted February 16, 2021 Posted February 16, 2021 Welcome to Autoit and the forum! Can you please tell us which application you try to automate? Using pixel coordinates is very unreliable as it depends on screen resolution, window position etc. Most of the time there are more reliable ways to do what you want to do. 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
CrazyMob Posted February 16, 2021 Author Posted February 16, 2021 for example ? i play internet game on chrome and i find out the pixel cordinates its good enough just dont get why its not find the specific pixelcolour and still keep work on the next command i want that this func just check allways for this pixelgetcolour and if its there it will do the rest of actions
Moderators JLogan3o13 Posted February 16, 2021 Moderators Posted February 16, 2021 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts