army61040

Unable to Pause script until Enter key is pressed

2 posts in this topic

#1 ·  Posted

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)
 

Share this post


Link to post
Share on other sites



#2 ·  Posted

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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