From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-11-2017 07:05 AM
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 ?
05-11-2017 07:39 AM - edited 05-11-2017 07:42 AM
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.
05-11-2017 08:58 AM
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.
05-11-2017 09:32 AM
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
05-12-2017 04:48 AM
Thank you so much!