liat00 Posted December 10, 2009 Report Share Posted December 10, 2009 Hi, I'm working on a project which needs to interface with a exe file which does functional testing on PCBs. I do not have the source code. I know that any exe can be controlled via command window, however i want to know if there are any other ways... The idea is to automate the process. Currently to run through the whole process the operator needs to click on a "continue" button several times. Instead of doing this, I want to simulate keystrokes of tab+tab+space on Labview. Can i redirect the keystrokes to effect the software running and not Labview? Thanks! LSH Quote Link to comment
Antoine Chalons Posted December 10, 2009 Report Share Posted December 10, 2009 Hi, I'm working on a project which needs to interface with a exe file which does functional testing on PCBs. I do not have the source code. I know that any exe can be controlled via command window, however i want to know if there are any other ways... The idea is to automate the process. Currently to run through the whole process the operator needs to click on a "continue" button several times. Instead of doing this, I want to simulate keystrokes of tab+tab+space on Labview. Can i redirect the keystrokes to effect the software running and not Labview? Thanks! LSH You can set the mouse position and generate a click event programmatically. There is an example somewhere on NI's Website. maybe this one Quote Link to comment
liat00 Posted December 10, 2009 Author Report Share Posted December 10, 2009 You can set the mouse position and generate a click event programmatically. There is an example somewhere on NI's Website. maybe this one I want the Labview GUI to be the main screen though. The actual software should be only in the background (where the operator doesn't see it). I want the operator to see only pass/fail. simulating keystrokes or mouse click event effects labview - not the running software. Quote Link to comment
asbo Posted December 10, 2009 Report Share Posted December 10, 2009 My suggestion isn't LabVIEW, so maybe you won't like it, but if you've never heard of it there is a scripting language called AutoIt designed for tasks like this. It implements a bunch of handy APIs which let you do things like find the current activate window, get a list of open windows, get details of controls within those windows, and send keyboard/mouse input to all the of the above. I've used it before and I know a couple other people who really like it (hooovahh, cough cough). You *could* implement these same APIs in LV, but why re-invent the wheel if you don't have to, right? 1 Quote Link to comment
liat00 Posted December 10, 2009 Author Report Share Posted December 10, 2009 My suggestion isn't LabVIEW, so maybe you won't like it, but if you've never heard of it there is a scripting language called AutoIt designed for tasks like this. It implements a bunch of handy APIs which let you do things like find the current activate window, get a list of open windows, get details of controls within those windows, and send keyboard/mouse input to all the of the above. I've used it before and I know a couple other people who really like it (hooovahh, cough cough). You *could* implement these same APIs in LV, but why re-invent the wheel if you don't have to, right? I just took a look at AutoIt... and it looks perfect to what i want to accomplish. thank you asbo! I still would like to know if such a think is possible in LV - just for knowledge base. Quote Link to comment
jcarmody Posted December 11, 2009 Report Share Posted December 11, 2009 [...] I still would like to know if such a think is possible in LV - just for knowledge base. From the AutoIt website: Also supplied is a combined COM and DLL version of AutoIt called AutoItX that allows you to add the unique features of AutoIt to your own favourite scripting or programming languages! (Look, they misspelled "favorite"! ) Quote Link to comment
liat00 Posted December 11, 2009 Author Report Share Posted December 11, 2009 thanks, i didn't notice that - will definitely check it out. (and favourite is British English spelling ) Thanks everyone for the input! Quote Link to comment
hooovahh Posted December 11, 2009 Report Share Posted December 11, 2009 Yes I've used Autoit in LabVIEW, with ActiveX there's an example on NI's website some where...here it is. Be aware that the ActiveX doesn't have nearly as many features as the AutoIt, it seems the ActiveX call is only for the most used functions (which probably is you're use case). Another thing to keep in mind (probably not for this project) is that AutoIt can be compiled into a EXE with command line switches. What I've done in the past is build AutoIt code, then compiled it into a EXE (which should run in Windows without any installer) and then have LabVIEW interface with it by using the command line. I've also tried talking to AutoIt EXE using DDE and had some limited success. I could get LabVIEW to send out to the application, but I couldn't get the application to talk back to LabVIEW. Quote Link to comment
jcarmody Posted December 11, 2009 Report Share Posted December 11, 2009 [...] (and favourite is British English spelling ) [...] I know . Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.