Jump to content
Sign in to follow this  

Active Windows

Recommended Posts


I'm having a bit of a problem here. I wrote an AutoIT script that reads a text file and posts the data into specific fields into application GUI(Meditech).

This is the only way to update a Meditech screen. See code below.

The script works wonderfully but my problen is: if the user brings another window up say "UltraEdit", the script passed control off to Ultra Edit and pumps the data into it rather than the Meditech screen.

Question How do I insure that the scripts only enters the data into Meditech and not another?

Control Send hangs on me. GetWindowHandle looks great but when I run "AutoIT WIndow Info" there at times Window text and some time no window text .



some code below

Func GetCurrentWin (ByRef $WindowTitle, $WindowText)

WinWait($WindowTitle, $WindowText)

If Not WinActive($WindowTitle, $WindowText) Then WinActivate($WindowTitle, $WindowText)

WinWaitActive($WindowTitle, $WindowText)

EndFunc ;==>GetCurrentWin




$WindowTitle = "Meditech Health Care Information System"

$WindowText = "Batch Enter/Edit"

$Comment = "Acct#:" & StringMid($LINE, 32, 12) & " Loc: " & StringStripWS(StringMid($LINE, 10, 10), 3) GetCurrentWin ($WindowTitle, $WindowText)

Send($Comment & "{ENTER}"); -<---- Comment Line

Edited by brockaf

Share this post

Link to post
Share on other sites

Replace theis

Send($Comment & "{ENTER}"); -<---- Comment Line


ControlSend(title,text,control,string) ; see help

and the control ID can be gotten with au3info.exe in your autoit3 folder



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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...