LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autologin post method

James

That's exactely where I'm stuck. Have you tried to input some txt in the TextArea ? And a click on the "insertImage" button ? If yes, could you please post the way to proceed ?

Chilly Charly    (aka CC)
0 Kudos
Message 21 of 27
(1,857 Views)
I realize it has been a long time since anyone has posted on this thread but here goes.

I am using a derivative of the vi posted earlier to change fields and engage the submit function on a GUI for one of our devices. If you look at the frames source code you will notice that the GUI was written with 4 forms. However the forms are not identified using the 'name' variable. In another post and the MSDN it mentions that the forms are zero indexed and I should be able to access them that way. I created a VI to alter the fields in the first form (IP addresss, netmask etc). No matter what value I use for the index I can alter the fields in the first form. I can leave the index blank and the VI completes successfully. Which was great and I moved onto the values in the 2nd form. Now, using 99% the same vi, no matter what value I used in the index I can't alther the "System Configuration" fields (Baud Rate, ATA port # etc). I tried using the 'id=table1/2/3/3' (yes there are errors in the GUI HTML) field to identify the form I wanted to alter with no success.

I keep getting an Error 97:

Error 97 occurred at an unidentified location
Possible reason(s):
LabVIEW:  Null Refnum was passed in as input.

Does anyone have any suggestions on how to get the indexing to work or another plan of attack. I am standing on the shoulders of the people that created the original vi, I have a basic grasp on the HTML and ActiveX manipulation but this is the 4th page in the GUI that I was automating and the first problem I have not been able to over come. Is there a different debug method that I can use to view the data being processed by each of the invoke/property nodes? That would at least help to verify the VI is not accessing the data in the 2nd form. Or am I stuck because of the incomplet html page?

Any assistance is greatly appreciated.
Thanks.

 
Download All
0 Kudos
Message 22 of 27
(1,758 Views)
Hi testguy99,

The webpage you are trying to access wouldn't load;  it looks like it points to an IP address on your internal network.

I'm not sure what's going on here, but you can put probes on the input wires to each of the invoke/property nodes by right-clicking the wire and selecting 'Probe.'
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 23 of 27
(1,729 Views)
Thanks for looking at my VI.

The address was for the GUI of a device on my network, I have saved off the webpage and changed my VI so that it uses the local version of the .htm file. The location might need to be updated on your machine, I was using c:\. I still runs with as much success as yesterday. Remove the .txt extension from the files so that they work.

After saving off the webpage I did some quick edits to add name="config" etc into each of the form fields. Now if I point the IHTMLElementCollection at the appropriate form by name the rest of my VI works. However, since i don't have access to the cgi behind the GUI the ActiveX container on the front panel will display a "can't find this page" once the VI has run completely. When the highlight execution is used I can see the values on the GUI being altered before the page changes. So I know that the VI works with the edited webpage, solution one is to have the GUI recoded.

So without getting the GUI recoded, I was trying to access the same portion of the code in the unedited htm file identifying the form using the index lookup. I have tried 0,1,2,3 constants with no success. I tried using a control and constant of variant type and neither of those worked either.

When I put probes onto the datalines the output for a variant is "Value -> 86F05D4" or the reference line is "4201644032".  The variant value changes each time the VI runs so they were not much help.

The other avenue I have not gotten to work yet was changing the form to body and seeing if the Elements could be found that way, but I have had not figured out how to implement this yet.

Hope this clarifies things a little.
0 Kudos
Message 24 of 27
(1,716 Views)
Hi testguy99,

I've reproduced your problem, but I don't really know what's going on, and I couldn't find any good documentation on how the IHTMLElementCollection's index parameter works.  Do you have any VB examples or any other information?
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 25 of 27
(1,697 Views)
Hi Eric,

Unfortunately I have been assembling this VI through trial and error. I have been trying to use the information found in the MSDN here is the page for the 'item' element
http://msdn2.microsoft.com/en-us/library/aa170734(office.11).aspx

It looks like the first example is using the index in a for loop to find the forms. So the index function should work if it gets the right variant/long int type.



0 Kudos
Message 26 of 27
(1,672 Views)
Maybe a bug in the IE ActiveX interface?  I really don't know, but it doesn't appear like there is anything wrong with LabVIEW.

I'd recommend doing some tests in VB..  If you manage to get it working there, it should be a relatively simple task to convert it to LabVIEW code (see link).

Converting Visual Basic ActiveX Examples to Equivalent LabVIEW


Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 27 of 27
(1,660 Views)