Active Windows

3 posts in this topic

brockaf 0

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)