CrazyMob Posted February 16, 2021 Share 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 )) Link to comment Share on other sites More sharing options...
water Posted February 16, 2021 Share 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 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...
CrazyMob Posted February 16, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 16, 2021 Moderators Share 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! Link to comment Share on other sites More sharing options...
Recommended Posts