LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I i get a VI to stop running continuously ?

Ah, yeah, the code will continously click every time the Elapsed Time outputs a True value. You can make it only do it once if you disable the Auto-reset feature on the Elapsed Time express VI AND ADD LOGIC SO THE CODE ONLY EXECUTES THE FIRST TIME TIME ELAPSES.

 

This code should really only be used as a guideline to show you how you can click somewhere on the page. Your own code shouldn't function this way. (This code is actually really dumb because it didn't work for me. It should pull the coordinates of the OK button instead of hard-coding a coordinate value in. And like altenbach said, continuously clicking is a horrible user experience.)

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 11 of 21
(1,786 Views)

I am trying to trying to write an automated test (through Teststand) to validate a tool that we use. I would like the ability to click on different areas of the tool (i am trying to validate). This is where my NI contact directed me to...

0 Kudos
Message 12 of 21
(1,782 Views)

@James.M wrote:

You can make it only do it once if you disable the Auto-reset feature on the Elapsed Time express VI.

 


Noooo! Don't do that! If you disable autoreset, it will remain true forever after the time has elapsed once, meaning it will start moving the mouse withe every loop iteration, i.e. every 10 ms, probably making the VI completely unusable. 😞

 

As I said above, don't write code that moves the mouse around. There are better ways to achieve what you need.

Message 13 of 21
(1,770 Views)

Oops. Yeah, if you disable auto-reset, add other logic to only run the clicking code the first time it elapses.

 

Tip: Ctrl + "." will force quit your VI if I caused you to lock it up.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 14 of 21
(1,764 Views)

What other better ways do you know of? Keep in mind i'm using testtand to write my test code which is why I thought simulating a mouse click through a VI was a better option

0 Kudos
Message 15 of 21
(1,754 Views)

There are many ways to operate a control programmatically. warping the mouse is probably not something thet comes to mind first.

 

I am not familiar with teststand and why you would need to do this, but if it were a common and recommended usage pattern, it would be built-in.

0 Kudos
Message 16 of 21
(1,743 Views)

Several folks have written "abort.vi".  The one I wrote is here.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 17 of 21
(1,740 Views)

@dks2710 wrote:

I am trying to trying to write an automated test (through Teststand) to validate a tool that we use. I would like the ability to click on different areas of the tool (i am trying to validate). This is where my NI contact directed me to...


What is this tool?  Do you have to go through this special software or can you send it commands on your own?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 21
(1,724 Views)

If the tool is written using standard Windows interface objects, I'd recommend using AutoITscript, which has an ActiveX interface called AutoITX.  You can use it to send "click" commands to buttons and such by using the name of the button instead of by moving the mouse around.  

 

I've used it before in LabVIEW when interfacing with a 3rd-party application that normally communicates over TCP/IP even though it runs on the local machine, but has some functionality that wasn't working remotely but was working on their manual interface.

Message 19 of 21
(1,709 Views)

@Kyle97330 wrote:

If the tool is written using standard Windows interface objects, I'd recommend using AutoITscript, which has an ActiveX interface called AutoITX.  You can use it to send "click" commands to buttons and such by using the name of the button instead of by moving the mouse around.  

 

I've used it before in LabVIEW when interfacing with a 3rd-party application that normally communicates over TCP/IP even though it runs on the local machine, but has some functionality that wasn't working remotely but was working on their manual interface.


Holy crap, thank you. I have a program running on my home computer that automatically downloads some torrents for me (100% legal, no need to look over here). and I've been using AutoIt to interface with my torrent client by just clicking in specific locations and using keystrokes... This would make it 100% more reliable.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 20 of 21
(1,699 Views)