Jump to content

Active Windows


brockaf
 Share

Recommended Posts

Hello;

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 .

TIA

Allan

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