Announcement

Collapse
No announcement yet.

Wait Until Ready

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    Inquiring Minds Want to Know: Which approach did you use?

    Leave a comment:


  • John Thompson
    replied
    Thank you, thank you, thank you!

    Leave a comment:


  • Paul Squires
    replied
    Maybe try checking GetForegroundWindow handle to see if your intended window actually got focus after your Sleep??? Maybe put that check into a For/Next of say 5 iterations?

    Leave a comment:


  • Michael Mattias
    replied
    WaitforInputIdle() on process handle

    Leave a comment:


  • John Thompson
    started a topic Wait Until Ready

    Wait Until Ready

    I've made a PB program that takes magstripe data and keys it into a third-party application that I don't have direct access to. Currently, after swiping the card, the data is formatted, the third-party application is activated (SetForegroundWindow), I SLEEP for 1250 ms, and then I use SendInput to enter the information. This works most of the time.

    Occasionally, if there are certain (high cpu) other programs running on the computer it takes slightly longer for the third-party application to appear and data is not entered.

    Is there any way for me to check this third-party application to see if it is busy doing anything (appearing on screen, drawing its windows)? What would be the best approach? Check CPU usage, hook a message queue (?), etc.? I've looked at WaitFor*Object, but it doesn't appear it would be useful in this case.

    Thanks!
Working...
X