Hello,
I have a script with the sub routine to re-run every 10 second. But the script keep running eventhough I close the dialog.
Can I make it so if I close the dialog, it close every thing that is running
thank you
Dialog close but script keep running
Moderators: JRL, Dorian (MJT support)
Not sure what you are trying to do but a dialog handler can be used to close the script when a dialog is closed.
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Caption = 'Do Something'
ClientHeight = 61
ClientWidth = 190
object Label1: TLabel
Left = 24
Top = 8
Width = 130
Height = 13
Caption = 'Pick the "X" to stop the script'
end
object Label2: TLabel
Left = 32
Top = 32
Width = 3
Height = 13
end
end
EndDialog>Dialog1
//Use a dialog handler using the OnClose event
AddDialogHandler>Dialog1,,OnClose,Quit
//One more dialog handler for the guy who wants to pick the label "X"
AddDialogHandler>Dialog1,label1,OnClick,Quit
Show>dialog1
Label>Loop
Wait>1
GoSub>DoSomething
Goto>Loop
SRT>Quit
Exit>0
END>Quit
SRT>DoSomething
Let>kk=0
Repeat>kk
Add>kk,1
SetDialogProperty>dialog1,label2,caption,Do something %kk% times
Wait>0.01
Until>kk=1000
END>DoSomething