Jump to content

Waiting for Key


Recommended Posts

Yes, I'm new to AutoIt, but I have been using Winbatch for awhile.

I'm working on automating a vertical market application that didnt

have the end-user in mind when it was developed. What Im look for

is a simply way to fill out forms without moving back and forth between

the keyboard and mouse. I need a way in AutoIt to pause the script while

user enter data into a textbox then press say the F12 key to advance the script

to the next field. I could not find any function or command that does something

like WaitForKey.

Any and all input would be appreciated.

gchichester

Link to comment
Share on other sites

Yes, I'm new to AutoIt, but I have been using Winbatch for awhile.

I'm working on automating a vertical market application that didnt

have the end-user in mind when it was developed. What Im look for

is a simply way to fill out forms without moving back and forth between

the keyboard and mouse. I need a way in AutoIt to pause the script while

user enter data into a textbox then press say the F12 key to advance the script

to the next field. I could not find any function or command that does something

like WaitForKey.

Any and all input would be appreciated.

gchichester

Look up HotKeySet. But couldn't the user just press TAB? Well I suppose not, so then possibly ControlFocus might be useful to set the focus to a particular edit.

Welcome to the AutoIt forums :)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

@Martin

I remember that hotkeyset block "hotkeys" for others programs... like hotkey is reserved for script only :) and context menu of explorer beug perhaps it has been fixed...

Thats why i use _IsPressed...

Anyway this was a little note from me ...

Link to comment
Share on other sites

Welcome To The Forums! ^^; Also.. This Might Help :

; This Is Needed For The.. " _IsPressed () Function "
#Include <Misc.Au3>

; _IsPressed () Constants.. Or " HexKeys " Visit :
; http://www.autoitscript.com/forum/index.php?showtopic=73259

; Example.. 
; _WaitForKey ('7B') ; 7B = F12
; MsgBox ('0','Notice','Key : F12.. Was Pressed','0')

Func _WaitForKey ($Hex_Key, $Sleep = '50')
Do 
Sleep ($Sleep)
Until _IsPressed ($Hex_Key)
EndFunc
Edited by John2006

Latest Projects :- New & Improved TCP Chat

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...