DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog box

Hi everyone, I would create a dialog box that lists scripts. How can I do that? 
And where do I have to list the scripts? ideas ?

 

0 Kudos
Message 1 of 5
(3,389 Views)

Hi,

Do you want to list scripts in a specific directory? Or opened scripts in DIAdem?

Here's an example that lists all script files in a directory and displays it using a normal MsgBox:

const FolderPath = "C:\Program Files (x86)\National Instruments\DIAdem 2015\Examples\Documents\"
dim i,ScriptPath, OutputTxt
for each ScriptPath in DirListGet(FolderPath, "*.vbs", "filename", "onlyFilenames")
	OutputTxt = OutputTxt & ScriptPath & vbcrlf
next
call MsgBox(OutputTxt)

You can use DirListGet command to receive a list of files with a specific extension in a specific directory.

You can also create a SUD dialog with a list box to show all files that were found.

Christian
CLA, CTA, CLED
0 Kudos
Message 2 of 5
(3,371 Views)
In fact, I normally do three analyzes, and  I have three corresponding 
scripts, the goal for me of the creation of the dialog box which allows in one
click to execute one of the scripts (according to our choice). I created the
dialog box attached. But when I click on the button it does not execute
anything, knowing that I have written the corresponding scripts to each button.
Is that correct? i'm a beginner.
 

 

0 Kudos
Message 3 of 5
(3,355 Views)

Here's an example of a SUDialog that shows all the VBScripts loaded in the SCRIPT panel.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Download All
0 Kudos
Message 4 of 5
(3,351 Views)

Thank you so much!

0 Kudos
Message 5 of 5
(3,320 Views)