I am building a toolbox of utils. As there are many buttons on the dialog, I wanted to not include all the code in the main script but rather have the script run other small scripts that are in the prog dir.
So I have two questions,
a: What is the best way to pass a variable from one script to another, or do I just have to write it out to disk and have the other script pick it up.
b: In the example below I am calling a ping function in another script that
results in success or failure. I want to give the illusion in the dialog box that the ping is running. To do this I wanted to turn on a series of green lights one by one if the ping is good. So I have done it the way below. I works great untill I have to close the dialog3 or I would get "Cannot make visable window modal" The problem I am getting is the that when I close and open Dialog3 then I get that visable jump of the dialog box where it closes and opens.
Does anyone have any ideas on how I can get around this and make the close and open much smoother, or not have to do the open,close?
Code: Select all
Label>MainLoop
Show>Dialog3,result
If>result=2,End
If>result=1,Ping
Goto>MainLoop
SRT>Ping
Macro>C:\Program Files\DnsOpsTool\Bin\Ping Function.scp
//Get var back..somehow.
If>var=0
// put someting on screen
Endif
If>var=1
Show>Dialog3
SetDialogObjectVisible>Dialog3,msImage10,1
Wait>1
ResetDialogAction>Dialog3
Wait>1
SetDialogObjectVisible>Dialog3,msImage11,1
Goto>SecondLoop
Endif
END>Ping
Label>End