DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

execute script without closind dialogbox

Hello,

 

I woud like to execute my main script.vbs

 

And in the same time keep a dialog box open with one button changing a global variable.

 

how can i do that?

 

Best regards,

 

fmanuel

0 Kudos
Message 1 of 6
(5,220 Views)

Hi fmanuel

 

Is your global variable declared in the main script??. If it so, you should create a SUD which calls the main script in the Initialize Event, and modify the global variable using the events for the button control. Once you have the SUD you should call it using the Call SUDDlgShow function.

 

Cheers

0 Kudos
Message 2 of 6
(5,216 Views)

How should i call the main script?

0 Kudos
Message 3 of 6
(5,208 Views)

Hi frmanuel,

remember to call a not modal dialog so that the Mainb script can run further while keeping the SUD Dialog opened.

 

Command: SUDDlgCreate

http://zone.ni.com/reference/en-XX/help/370859J-01/comoff/suddlgcreate/

 

Best regard

 

Andre

0 Kudos
Message 4 of 6
(5,195 Views)

Thanks for help, i did it this way:

 

If NothingisSudNonModalDlgLst("Dlg2") Then

   Set profile_search_dialog_box = SUDDlgCreate("Dlg2",MyFolders(1)&"profile_search_dialog_box.SUD",NULL)

Else

   Set profile_search_dialog_box = SudNonModalDlgLst("Dlg2")

End If

      Call profile_search_dialog_box.Show

 

 

But now I can not act anymore on my buttons.

 

I did use:

Call InteractionOn

 

Then my Dialogbox became active and my script stop working

 

How can I have both: Script.vbs runníng and in the same time buttons working?

 

Best regards,

 

fmanuel

0 Kudos
Message 5 of 6
(5,181 Views)

Unfortunately not.

VBScript doesn't seem to embrace a straight forward notion of multithreading, so there will be no way to execute these tasks (main script and dialog) in parallel.

 

Andrea

0 Kudos
Message 6 of 6
(5,177 Views)