How do I wait for Google Chrome to load a webpage before continuing in AutoHotkey?

后端 未结 6 794
南方客
南方客 2020-12-10 12:30

I am working on a AutoHotkey script that does a repetitive job in Google Chrome. Every time that I click a link from the script, I have to tell my script to sleep while the

6条回答
  •  囚心锁ツ
    2020-12-10 12:40

    You can use the mouse cursor status like this:

    Sleep, 200
    while (A_Cursor = "AppStarting" or A_Cursor = "Wait") ; Wait for browser to be ready (page loaded)
        continue
    Sleep, 200
    while (A_Cursor = "AppStarting" or A_Cursor = "Wait") ; Wait for browser to be ready (page loaded)
        continue
    

    I do this twice, just to make sure that a brief status change of the mouse cursor is not giving the wrong data back.

提交回复
热议问题