04-17-2015 10:32 PM
I've been struggling to use the activeX browser methods and properties as the scripting syntax translates to LabVIEW. For example, the diagram image I am attaching shows the Navigate flags I have tried and failed to produce the desired effect. Anybody have any ideas why the method is not loading a browser with 5 tabs? Am I not using the method function properly? I also tried to use the OpenNewWindow flag and this seemed to do nothing as well. The only effect I have is the URL loading into the same tab each time, including the original tab opened in the existing web browser session.
I found my information here:
https://msdn.microsoft.com/en-us/library/aa768360(v=vs.85).aspx
Solved! Go to Solution.
04-18-2015 02:07 PM
This seems to work fine here (Win 7, IE 10):
It opens a new window with 3 tabs (it starts with an empty one). Maybe it's because it's set up to open links in new tabs.
04-20-2015 12:07 PM
I am using Win 7, IE 10, the same ActiveX class and same method function. But it only loads new URLs into the very same starting tab. The flag values dont seem to have any affect. It acts as if I have not applied any flags at all. New forground tab, background tab, new tab, and the OpenNewWindow values dont seem to do anything.
I can get the same result by not tying in any flag values. I am wondering if there isnt an OS security setting that is preventing me from using the flag arguments. I couldnt find anything in IE 10 options that would impact this. And there is nothing within the LabVIEW settings that is jumping out at me here.
I'll see if I can research the flag issue. It is important to get this working, otherwise any variant data I pass into these functions may not work correctly.
Thanks,
Mike B.
04-21-2015 02:36 AM
Like I said, my IE is configured to open links in a new tab (settings>>tabs>>at the bottom) and I'm guessing that's what does this. Other than that I can't really say anything, as I haven't used IE in years.
04-21-2015 05:09 AM - edited 04-21-2015 05:10 AM
If I use the snippet from tst with 0x10000 on my system nothing happens at all. If I use 0x10001 then a new IE window opens with 3 tabs, an empty one and one other for each link, no matter what setting I have in the IE Options for how to open external links.
LabVIEW 2014, Windows 7 pro, IE 10
04-21-2015 09:04 PM
Hmmm I have been working on this again today and cannot find a reason why flags have no effect on the Navigate method. When I began playing with ActiveX on this system, I had to manually register the MSCOMCT2.OCX and MSCOMCTL.OCX files to get the LabVIEW functions to work properly. I am wondering if there are other related OCX registrations that need to be active.
The trouble with the LabVIEW method is I don't have an option to retrieve the "return value" from the Navigate method when executed. I don't know if I have a valid parameter or if the command was completed. I do not get an ActiveX error propagating from the method function when executed.
I am using LabVIEW 2011. I don't know if that has anything to do with my problem duplicating your success in using the method.
Mike B.
04-21-2015 10:43 PM
Are you sure you're using the same ActiveX method? I noticed that in your image you're using the "Navigate" method, whereas the image that tst posted uses the "Navigate2" method. Also, are you embedding your Internet Explorer window inside the LabVIEW front panel? If so, I'm not sure tabs are supported.
05-01-2015 05:26 PM
The problem was in the data type for the FLAG value. I was passing an I64 represented hexidecimal datatype into the variant conversion function. When I selected I32 for data representation, the method began to work properly.
Mike B.
02-08-2016 02:43 AM
I use the same for opening XML-Reports (TestStand).
If you don't want to have the empty tab first, just open at first one file and after that use the For-Loop to open further files in additional tabs.
In my case only the flag x10001 works (I32).