Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7756581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:51:38+00:00 2026-06-01T12:51:38+00:00

I am injecting javascript into a page via autohotkey by entering javascript:blahblahblah into the

  • 0

I am injecting javascript into a page via autohotkey by entering javascript:blahblahblah into the location bar.

I need to determine if IE is waiting to navigate to a new page (e.g. page status is spinning, but it hasn’t refreshed to the new page yet).

Currently I’m using document.readyState, however, there is sometimes a long delay before the remote webserver replies. During that delay, readyState still says “complete” (because it is complete, it’s just the old page, not the new one)

If I try to do something to the page, it will be operating on the old page, rather than the upcoming one.

I could just sleep for a couple of minutes after each page navigation, but that would make the script take forever.

Hooking onunload won’t work via the addressbar, since each time I enter something in the address bar it will trigger the onunload, causing tons of false-positives.

Is there some way in javascript on IE to tell if the browser is waiting to go to a new page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:51:39+00:00Added an answer on June 1, 2026 at 12:51 pm

    What a coincidence, I was just looking around for the same issue,I used to use readyState and faced your problem, I found a similar event handlers in VB like you also tried to use but as you said it will execute every time event is triggered.

    Sol:
    I looked up in MSDN and found Busy property which gets a value that indicates whether the object is engaged in a navigation or downloading operation, now I use it in addition to
    readyState, the Busy is for waiting remote server to reply and readyState is for the object to be ready to take actions with it.

    notice: I tried to use Busy alone but some times the reply is too fast and the next instruction tries to be executed before the object is ready.

    Example in AHK (test login page 20 times at high rate):

    Loop, 20
    {
    Global IE := ComObjCreate("InternetExplorer.Application")
    IE.visible := 1
    IE.Silent := 0
    Login:
    IE.navigate("www.example.com")
    While (IE.ReadyState != 4 or IE.Busy = True)
    continue
    
    IE.document.forms("login").name.value := "Username"
    IE.document.forms("login").password.value := "Password"
    ;IE.document.forms("login").s1.Click()
    IE.document.forms("login").Submit()
    While (IE.ReadyState != 4 or IE.Busy = True)
    continue
    
    ;sleep 1000 ;use it just to see that you are login successfully 
    IE.Stop()
    IE.Quit()
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm injecting Javascript into a page w/ Greasemonkey, doing some processing on the body
As i am new to this concept called sql injections and javascript injections into
TLDR I need to change a javascript variable on the same page after clicking
I need a method of inserting javascript which is controller/action specific into a layout.
I get that JSON.parse() prevents an attacker from injecting javascript into the response since
I'm injecting JavaScript code into a website for personal use, using a Google Chrome
According to this definition here : Unobtrusive JavaScript avoids injecting inline JavaScript into HTML.
Is there a way to prevent Castle Windsor from automatically injecting dependencies into properties
i have following code for inserting another page into div An XHTML 1.0 Strict
I'm inserting some data into a div container via ajax. When its just straight

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.