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 6713301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:21:48+00:00 2026-05-26T08:21:48+00:00

My loop in my autohotkey script is only running through once. Can anyone tell

  • 0

My loop in my autohotkey script is only running through once. Can anyone tell me why? Thanks

Loop, 8 
{
  WinActivate, NDTr
  ControlClick, Button3 ;Select Batch, enter info, start collecting data
  WinWait, Batch Readings
  ControlClick, Edit1
  Send {BS}+{BS}+{BS}+{BS}+{BS}+{BS}
  Send 1
  ControlClick, Edit2
  Send {BS}+{BS}+{BS}+{BS}+{BS}+{BS}
  Send 15

  if A_Index = 4
  {
    Sleep, 20000
  }
  else if A_Index = 7
  {
    Sleep, 20000
  }
  else if A_Index = 1
  {
    Sleep, 3000
  }
  else 
  {
    Sleep, 15000
  }

  ControlClick, Button1
  Sleep, 15000
}
  • 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-05-26T08:21:49+00:00Added an answer on May 26, 2026 at 8:21 am

    WinWait looks like a likely culprit like anthv123 said. Double check your window’s title and make sure it fits the TitleMatchMode that you’re expecting.

    Common debugging practices include adding different ToolTips in places along the problem code. For example tooltips above and below the WinWait line with texts “before” and “after” would tell you if it’s pausing indefinitely at that part (if it never says “after”).

    Sleeping for 3-20 seconds isn’t going to help your patience either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I loop through a bunch of directories recursively. Some of them (like D:\$RECYCLE.BIN\S-1-5-20 )
/// \todo Loop must be rewritten ... /// \todo Delete this loop Can Doxygen
I'd like a loop that uses a UInt16 (ushort) to loop through all of
I know I can loop over the string or build a regex or invert
I am writing a Autohotkey script that need to 'check' and 'uncheck' checkboxes defined
I'm writing a script in AutoHotKey, and I've stumbled upon an impasse. Right now
//loop through usernames to add to league table for ($i = 0; $i <
I want to loop a array of chars in a WHILE loop (with only
I have a loop in my KornShell (ksh) script that I want to execute
I have a foreach loop that has try catch and finally. it goes through

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.