From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically change fields in application

Hello,

 

I have to make testsoftware but I need to controll several application manually to test it.

How can I change a field of an application that is running.

This application is not labview.

 

eg. notepad is running and I want to enter a text in notepad only by my labview application.

 

gr,

0 Kudos
Message 1 of 10
(2,849 Views)

If you want to control Notepad, I think you'll need ActiveX or something similar. 

 

One quick search hit this page: http://forums.devshed.com/html-programming-1/opening-notepad-w-activex-1336.html

 

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 2 of 10
(2,839 Views)

Do you really need to use Notepad or can you simply modify the file directly in LabVIEW? I imagine that you are trying to change a configuration file for a device and therefore you should be able to directly modify the file through LabVIEW using the file and string primitives.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 10
(2,835 Views)

Well the situation is this.

I need to automate a test which is now manual input.

 

It is not notepad I want to use, that was merely an example(maybe bad example)

 

So I first call the 'application' which comes from the customer.

Then I want labview to enter severall fields in the 'application' and also activate some buttons.

 

Note this application is no labview application, also don't have the source.

 

I did search the internet for the 'handle' subjects but no result in what I need.

 

 

 

 

0 Kudos
Message 4 of 10
(2,823 Views)

You might want to check out the free program called "Auto It".

It's designed to do what you're looking for.

 

http://www.autoitscript.com/site/autoit/

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 5 of 10
(2,813 Views)

Hello Steve,

 

That looks very interresting!

I tried it but there seems no option to retrieve a value from the application.

 

I also tried to use teststand to do this, when opening a exe I can add a "handle" to it.

Think that I then have to use kernel32.dll to get and put data, but dont know how the function must look like.

 

0 Kudos
Message 6 of 10
(2,808 Views)

> I tried it but there seems no option to retrieve a value from the application.

 

I wouldn't hurt to ask your specific question in the Autoit forum, just to be sure.

 

From the feature list:

 

"Directly get information on and interact with edit boxes, check boxes, list  boxes, combos, buttons, status bars ..."

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 10
(2,794 Views)

Did some testing yesterday.

Now I use a function to move the mouse to a location on de application.(before this I use the function "Blockit" from the user32.dll so that the mouse cannot be moved by the tester)

Then use the function CTRL+c to copy the value to clipboard.

 

Now I have to find a way to compare the value from clipboard with teststand.

0 Kudos
Message 8 of 10
(2,789 Views)

Take a look at this thread. It has examples of reading data from the clipboard.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 10
(2,774 Views)

 

All thanx for the reply.

I thought teststand would be able to get the clipboard data somehow but I did not find how.

 

Special thanx for the link to autoit, really nice program and also free!

 

Now I made a VI(see below) which makes it now posible to get the clipboard to teststand.

 

 

clipboard.JPG

 

gr,

0 Kudos
Message 10 of 10
(2,751 Views)