Ni.com is currently experiencing issues that may cause some pages to fail.

Support teams are actively working on the resolution.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Key Focus

I'm using Teststand 3.1 with the LV7.1 Prototype adter.  In TS I call an exe file which runs a macro "A" (#1 ) (I pass parameters from the configure executable tab.)  In TS I call LV and "talk" over the serial port (#2)( I use a routine from the examples lib shipped w LV7.1).  This works fine and is as far as I've gotten.  Is there a way to go back to the exe application ( key focus maybe?) and pass another macro "B" into it w TS?  Running it manually I do the following.  Launch the exe and type in the macro's name "A" ( same as #1 above).  Open LV and communicate with the board ( send some commands ) over the serial port ( #2 above).  Using the mouse, go back to the exe window, left click on it which makes it active again.  This puts the cursor in the window of my exe  ( key focus ???).  Using the keyboard, type in the name of my next macro "B" I want to run.  The macros exsist in a directory on my hard drive.  Is there a way to automate the last couple of steps ?  Go from TS to an already running app, emulate the keyboard to type in the name of macro "B", it does something, return to TS and continue with the rest of my TS sequence ????
 
 
You  can "make my day" by solving this!
Thanks,
Clint
0 Kudos
Message 1 of 4
(2,893 Views)

Hi Clint,

This exe, is it something that you have the source code for?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(2,886 Views)
Ray,
No, I don't have the source code.  Its from a 3rd party co.
0 Kudos
Message 3 of 4
(2,883 Views)
Clint

Is this third-party application also an ActiveX Server?  If so, one possible solution is to use the ActiveX Adapter in TestStand to make calls into the third-party application's ActiveX API to programatically enter text into the application's window. 

Another possible solution is to use the Windows API.  Here is a link to some information that may be helpful.

Russell G.
NI Applications Engineering
0 Kudos
Message 4 of 4
(2,849 Views)