I am working with LabView 5.1 and Windows (NT and 2000). My VI is
compiled as an ActiveX server, and I am successfully calling it.
However, there does not appear to be any LabView method for traversing
the VI's menus, so I have to send keystrokes (via the Windows
Scripting Host) to do that. Windows Scripting Host will only send
keystrokes to the currently active window - so if the VI has been
minimized, I must first make it active. How do I do that?
If I have Notepad running but minimized, I can make it the active
window and send it keystrokes like this:
$WShell AppActivate "Untitled - Notepad" ; Activates but stays
iconized
(wait one second)
$WShell SendKeys "% r" ; Restores (open
s) the
window
(wait one second)
$WShell SendKeys "Hello World"
but this doesn't work with my VI. The VI window appears, but the
menu-activation keystrokes don't do anything. They worked just after
the VI was started (before it was minimized). How do I correctly
re-activate the VI so I can send it keystrokes?
TIA.
Leslie