In my code below, when it comes to the message dialog, the list is updated, the next command being ResetDialogAction>Dialog1 I thought would update the list but it dosn't. I know it is somthing very simple, but I am missing it.
Code: Select all
Let>Staticlist=C:\temp\docTypes.txt
Let>Variablelist=C:\temp\CDfilelist.txt
Gosub>Sub1
Gosub>Sub2
SRT>Sub1
Let>list1=
Let>Staticlisttxt=
Let>k=1
Label>start1
ReadLn>%Staticlist%,k,list1
If>list1=##EOF##,finish1
ConCat>%list1%,%CRLF%
Let>Staticlisttxt=%Staticlisttxt%%list1%
Let>k=k+1
Goto>start1
Label>finish1
END>Sub1
SRT>Sub2
Let>z=1
Let>Variablelisttxt=
Label>start2
ReadLn>%Variablelist%,z,list2
If>list2=##EOF##,finish2
ConCat>%list2%,%CRLF%
Let>Variablelisttxt=%Variablelisttxt%%list2%
Let>z=z+1
Goto>start2
Label>finish2
END>Sub2
Dialog>Dialog1
Caption=Dialog1
Width=468
Height=460
Top=185
Left=407
ListBox=msListBox1,64,80,121,185,%Staticlisttxt%
ListBox=msListBox2,248,80,121,185,%Variablelisttxt%
Button=Exit,192,344,75,25,2
Button=>,200,96,41,25,1
Button=<200>Dialog1
Show>Dialog1
Label>Dialog1loop
GetDialogAction>Dialog1,result
If>result=2,Donewithit
If>result=1,Addtolist
If>result=10,EOF
Goto>Dialog1loop
SRT>Addtolist
WriteLn>%Variablelist%,result,%Dialog1.msListBox1%
GoSub>Sub2
MDL>%Variablelisttxt%
ResetDialogAction>Dialog1
END>Addtolist
SRT>Donewithit
CloseDialog>Dialog1
Let>result=10
END>Donewithit
Label>EOF