Jump to content

Unable to Pause script until Enter key is pressed


Recommended Posts

Hello,

I am trying to write a script that will select a search box within an application. Once the search box is selected, I would like for the script to pause until the data is entered into the search box. At that point, I will hit the Enter key and I would like the script to continue. Can someone please advise on the best way to do this? Thank you for all your help, I have attached what I have so far.

; Set the Escape hotkey to terminate the script.
HotKeySet("{ESC}", "_Terminate")

;Open application
   MouseClick ("LEFT",711,1056)
   Sleep (1000)
   MouseClick ("LEFT",926,768)
   Sleep (500)
;Search for name
   MouseClick ("LEFT",1210,66)
   Sleep (500)

  Do
 Sleep(50000)
Until Send("ENTER")
Sleep (200)

;Selecting name
   MouseClick ("LEFT",93,202)
 

Link to comment
Share on other sites

  • Developers

Why not also use hotkeyset for Enter which calls a Func that sets an variable when pressed?
This variable then makes your loop end.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...