LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto login to sites like yahoo, gmail...intranet sites..etc etc without user intervention

Thanks Andy.

Meanwhile if you could share an example in labview CVI for going to a particular frame in a page and access a form and submit it...(i mean in back ground)

It would be very helpful for me...

regards

vevek

 

0 Kudos
Message 21 of 29
(1,977 Views)
Here is the CVI code.  I have to clarify that LabWindows/CVI is a text based language also developed by National Instruments.  Here is the UIR and C file that are necessary to see what is going on.  Basically the same calls that were made in LabVIEW but this can detect the number of frames.  I used the following site to test:

http://www.htmq.com/html/sample/frame.htm

The files are attached. 

Andy F.

-----------------------------------------------------------------
National Instruments
Download All
Message 22 of 29
(1,968 Views)

Andy,

thanks for the help...

actually i am new to the LabWindows/CVI....i just got practised to the new enviornment..

I created a new proj in CVI and added a fp file(activex controller wizard)...

but the

0 Kudos
Message 23 of 29
(1,958 Views)

Hi Andy,

thanks for the CVI code..

i am new to CVI..

i created a new proj and using the activex controller added the IHTML properties and methods to the fp file..

i included the .c file and .uir files sent by you..but not able to find the header files send by you

"mshtml.h"
"inetcontrols.h"
"testproject.h"

According to my knowledge the mshtml.h file is created while the fp file creation...i created a msie.fp file so msie.h file was created.

Is my understanding right??

Could you please elaborate this..

and send me the "inetcontrols.h""testproject.h" files ....

Regards

Vevek

0 Kudos
Message 24 of 29
(1,958 Views)

Andy,

One more doubt i have is ..i need to integrate the CVI code(by creating a dll) with VC++..in that case will the uir window open and then execute or will not??

Is there any solution of not opening the uir when we execute.??(but all the tasks are to to donein back ground)..because if we check in labview the window doesnot popout..it loads in the control in the IHTMLWebbrowser.navigate.(as in your google eg)

regards

vevek

0 Kudos
Message 25 of 29
(1,956 Views)

Hi Andy,

I explored cvi and got the code half a way through and got errors in IHTMLElementcollection.item fucntion in CVI..

below is the definations and functions i used:

HRESULT status;
    VARIANT vCStr;
    VARIANT element;
    static MSHTMLObj_IHTMLFramesCollection2 pFramesCol;
    static MSHTMLObj_IHTMLElementCollection formsHandle;
    static MSHTMLObj_IHTMLDocument2 doc;
    static CAObjHandle pHandle;

MSHTML_IHTMLDocument2Getframes (docHandle, NULL, &framesHandle);
 MSHTML_IHTMLFramesCollection2Getlength (framesHandle, NULL, &numFrames);
 
 
    status = CA_VariantSetCString (&vCStr, "FRAME NAME");
HTML_IHTMLFramesCollection2item (framesHandle, NULL, vCStr, &vCStr1);

    
    status = MSHTML_IHTMLWindow2Getframes (framesHandle,NULL,&pFramesCol);
   
    status = MSHTML_IHTMLWindow2Getdocument (framesHandle,NULL , &doc);
                                              
    status = MSHTML_IHTMLDocument2Getforms (doc, NULL, &formsHandle);
   
    status = CA_VariantSetCString (&element, "FORM NAME");
   
    status = MSHTML_IHTMLElementCollectionitem(formsHandle,NULL,element,CA_DEFAULT_VAL, &pHandle);

i checked the status and the handles in debug mode..and everything was ok except the MSHTML_IHTMLElementCollectionitem
function in which pHanle was "zero"..means no elements were collected..
i also tried with your google eg in labview
 
long p;
status = SHDocVw_IWebBrowser2GetDocument (webHandle, NULL, &docHandle);
    status = MSHTML_IHTMLDocument2Getforms (docHandle, NULL, &formsHandle);
     status = CA_VariantSetCString (&element, "f"); 
     status = MSHTML_IHTMLElementCollectionGetlength (formsHandle, NULL,&p);
                                                   
    status = MSHTML_IHTMLElementCollectionitem(formsHandle,NULL,element,CA_DEFAULT_VAL, &pHandle);
 
here aslo pHandle was zero...
Could you please clarify me whether i am in the right way or not...?? and share an example for searching in google in CVI enviornment..and also check if the implmentation for the frames are correct?
 
regards
vevek
0 Kudos
Message 26 of 29
(1,940 Views)
Vevek,

You have posted this question to the CVI forums correct?  I think I will let the CVI experts (of which I am definately not) take care of this one.  In the meantime I will continue to work on getting something similar to work in LabVIEW using .NET.  Thanks!

Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 27 of 29
(1,915 Views)

Hi Andy,

I have posted the same in CVI forum ...

Hope Sarah(application engineer) will be able to help me...

i think i am struck in a very small issue...if that is solved then i can succeed in the implementation..

Thanks for youe help..

If accessing a form in a frame in back ground is possible in some other methods(using .NET...) please let me know...

Thanks & Regards

Vevek

 

0 Kudos
Message 28 of 29
(1,906 Views)

How about liking on Facebook (Click the Like Button) automate once the account already log in

0 Kudos
Message 29 of 29
(837 Views)