05-02-2023 09:42 AM
I have a rather intricate LabWindows program that dates back to CVI 2010 or so. It has been described by users in our testing group as a "swiss army knife", meaning that it has just about every test function you might want, *if* you know what to click in what order. I've been asked to add automation so that it either self-clicks on things for a given task or at least guides the user into clicking on the right things.
I found the thread "Automating a LabWindows/CVI program" (https://forums.ni.com/t5/LabWindows-CVI/posting-an-event-to-the-event-queue/m-p/823264) which kind of asked the same question. Essentially, if I could have the code place mouse clicks in the queue by button ID I could pull this off. The only real answer offered was to call the callback using a function that no longer seems to exist - CallCtrlCallback().
Are there any tricks for doing this without totally restructuring this code? The knife blade flips just need to be automated, I don't want to replace the blades or sharpen them. Thanks!
Solved! Go to Solution.
05-03-2023 02:02 AM
CallCtrlCallback () still exists, provided you add the Programmer's Toolbox to your projects. The toolbox can be found in <CVIfolder>\toolslib\toolbox\ folder: you can add toolbox.fp to your project in Instrument menu or better in Library menu: I suggest the latter option since the instrument contains a lot of useful functions that you can find useful for your projects. I use them extensively, and I strongly suggest you to spend some time exploring the toolbox function tree: you may be surprised of how many little gems are there!