How to Determine when Chrome has completed loaded a website using AHK

Get help with using AutoHotkey and its commands and hotkeys
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

How to Determine when Chrome has completed loaded a website using AHK

16 Dec 2018, 08:36

Has anyone come up with code to determine when Chrome has actually finished loading a website using AHK?
This has been a problem for years, I have looked at hundreds of answers, none work well, if at all, hopefully someone has an answer.
I have tried checking the color of the load icon, but that only works some of the time and it is a real pain to try to find the exact pixel to use on a 4K monitor, when it quits working.
My Chrome() function opens a website in a new window (not a tab) and determines the new windows ahk_id.
I would greatly appreciate code that knows exactly when the website is completely loaded in Chrome.
Thank You.

AHK Version 1.1.30.01
My System Specs...
Windows 10 x64 (Latest Updates)
Intel Core i7-920 2.66ghz CPU
12gb DDR3 1600 Triple Chanel Memory
AMD Radeon HD 7850 2GB 256bit GDDR5 Memory Graphics Card
Hisense 49" 4K Monitor (3840x2180)
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

Re: How to Determine when Chrome has completed loaded a website using AHK

16 Dec 2018, 10:49

jmeneses wrote:
16 Dec 2018, 09:41
hi jwinfl You have this class https://github.com/G33kDude/Chrome.ahk/ ... Chrome.ahk
Thank you for your prompt reply.
Chrome.ahk shows two #Include files...WebSocket.ahk and Jxon.ahk, I downloaded them and I assume I need them.
I copied the code to a file named Chrome.ahk and I assume I now need to Include (#Include...) that File in my code.
Beyond the above I am not sure how to actually implement it.
Exactly how do I use Chrome.ahk to know when a website is loaded?
Do I need to open the website using Chrome.ahk to find out when the website has finished opening, if yes, how?
Thanks again.
User avatar
jmeneses
Posts: 494
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: How to Determine when Chrome has completed loaded a website using AHK

16 Dec 2018, 13:17

I have never used this class, Look this thread https://autohotkey.com/boards/viewtopic.php?t=42890 maybe it serves you
Donec Perficiam
User avatar
Scr1pter
Posts: 1208
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: How to Determine when Chrome has completed loaded a website using AHK

16 Dec 2018, 13:33

How about using ImageSearch?
When a site has been loaded completely, you can see a cycle.
(Which means the page can be re-loaded when clicking on it.)
I used that method on my tablet and it worked pretty well.

Just in case that you get problems with these libraries.

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G15 FE - Mice: Logitech G9 FE, G502 FE, G602, Jelly Comb Touchpad - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.32.00
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

Re: How to Determine when Chrome has completed loaded a website using AHK

17 Dec 2018, 07:26

Scr1pter wrote:
16 Dec 2018, 13:33
How about using ImageSearch?
When a site has been loaded completely, you can see a cycle.
(Which means the page can be re-loaded when clicking on it.)
I used that method on my tablet and it worked pretty well.

Just in case that you get problems with these libraries.

Regards
Thank you for your reply, I tried Image Search a couple of times, never could get it to work.
Would you please post the code that you used that worked on your tablet and I will try to figure out how to modify it for my 4k monitor, if needed.
Also knowing how you obtained the image, its size, etc. might also be helpful.
Any help will be greatly appreciated.
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

Re: How to Determine when Chrome has completed loaded a website using AHK

17 Dec 2018, 07:34

jmeneses wrote:
16 Dec 2018, 13:17
I have never used this class, Look this thread https://autohotkey.com/boards/viewtopic.php?t=42890 maybe it serves you
Thank you for your reply. I looked at the code, it is a lot to comprehend. I will try to find time to play with it.

SOMEONE SURELY HAS EXISTING CODE THAT KNOWS WHEN CHROME IS LOADED...PLEASE SHARE IT.

Knowing when Chrome loads seems like such a necessary AHK function that someone one has to have written it already.

Return to “Ask For Help”

Who is online

Users browsing this forum: MrWZY, RubbeH and 41 guests