CloseDialog doesn't seem to work in a compiled script.
Example 1: CloseDialog command is Inside an subroutine
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 408
Top = 111
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 115
ClientWidth = 263
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object MSButton1: tMSButton
Left = 79
Top = 39
Width = 105
Height = 36
Caption = 'Start my SRT!'
TabOrder = 8
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,MSButton1,OnClick,My_SRT
Label>Start
Show Dialog1,r
SRT>My_SRT
MDL SRT STARTED
CloseDialog>Dialog1
MDL Did the dialog close?
SkipLabel>Start
END>My_SRT
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 408
Top = 111
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 115
ClientWidth = 263
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object MSButton1: tMSButton
Left = 79
Top = 39
Width = 105
Height = 36
Caption = 'Start my SRT!'
TabOrder = 8
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,MSButton1,OnClick,My_SRT
Label>Start
CloseDialog>Dialog1
MDL Did the dialog close?
Show Dialog1,r
SRT>My_SRT
MDL SRT STARTED
SkipLabel>Start
END>My_SRT
Am i doing something wrong here?