LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i pass a vbscript variable to a labview vi?

Ah, now it is depending on what the LV program is doing. If the entire purpose of the LV application is to set the wallpaper, then you can't use it. That application must run on the client's machine and thus you would need to install the LV app and the LV runtime on the user's machine. Code running on the server cannot reach out to the client's machine and set the wallpaper. Again that would be a major security hole.

If that is the case - is it okay to simply display the image in the client's browser and have them right-click and say "Set As Background"? It is an extra step but makes things very easy to do.


If the LV application somehow generates or otherwise obtains (such as from a database) the bitmap, you can do the following:

1. I assume you already have this part based on what you have said, but the client's web browser hits the server page which returns the list of possible bitmaps.

2. Client selects the bitmap and presses submit. The web page sends the bitmap name back to the server via the form submit. Note that this is all straight HTML so you don't necessarily need VBScript - unless if you are doing fancy selection options or such. In either case, it ends up with and HTML submit of an HTML form -> HTTP GET or POST.

3. Server receives the name of the bitmap as one of the post parameters. This needs to be coded up in the server side code of your choice, but I recommend ASP.NET. You can use VB.NET or C#, but there are a lot of examples of getting parameters from a form submit out there.

4. Server turns around and runs the LV VI passing it the bitmap name. This could be done in different ways.
a. Build the VI into an EXE and pass the name as a command line argument.
b. Build the VI into a C-style DLL and pass the name as an input parameter to the method.
c. Use the LV ActiveX server interface to load and run the VI, passing the name as a parameter of the VI.

5. LabVIEW returns the bitmap. This could be done either as a binary stream output from the VI or DLL, or you could write the bitmap result out to a temp location. Either way the server takes this data and returns it as the result of the form submit.

6. The client's browser now receives the bitmap data. You must use the VBScript to tell IE to set this image as the user's wallpaper (or you display it in the browser and the user right clicks on the image and says "Set As Background").
Message 11 of 13
(1,419 Views)

hi I am unable to open labview aplication in ,vbs format,

tell me the way to make it open,does any suporting software is required

0 Kudos
Message 12 of 13
(766 Views)

 


@9740523491 wrote:

hi I am unable to open labview aplication in ,vbs format,

tell me the way to make it open,does any suporting software is required


 

Did you notice that this thread is 5.5 years old?

 

I am very confused about your question. A LabVIEW application is never in "vbs" format, so, obviously, something got lost in translation. What do you mean by "open"?

 

Please add a paragraph or two explaining exactly what you are trying to do. Thanks! 🙂

0 Kudos
Message 13 of 13
(759 Views)