DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: wanted for AutoHotkey: color-detecting solution I can use in my scripts  (Read 5,485 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Hello!

I have several scripts that load a website and interact with it in some way. Because it was the easiest-to-code solution, I'm using "sleep" for the script to wait until the site has loaded. That sucks though, because load times depend on Windows and server load and so I either have to use really long "sleep" times (zzzZzZzz...) or short "sleep" times that then cause the script to fail because the site hasn't yet fully loaded.

I'd love to be able to use a solution that detects if a given pixel has color #whatever (I imagine something like "PixelGetColor, 500, 600" and "IfPixelColor = ..."). I googled around and there doesn't seem to be a good solution for this yet. Or maybe Chrome can report back to AHK somehow that it has finished loading that tab?

Any ideas?  :)
Thank you.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: wanted for AutoHotkey: color-detecting solution I can use in my scripts
« Reply #1 on: September 30, 2015, 11:54 AM »
You may find some ideas in these threads:

http://www.autohotkey.com/board/topic/73692-wait-until-site-has-finished-loading/page-2

http://stackoverflow.com/questions/23698421/autohotkey-wait-for-browser-to-load-webpage-before-continuing

Original address: https://www.donationcoder.com/forum/index.php?topic=41675.0