Layout:
Non Module Dialog with 3 buttons
-button 1 goes to Dialog1
-button 2 goes to Dialog3
-button 3 goes to Dialog4
User selects a button and goes to new Dialog. User inputs info into fields and clicks Button "Done".
After "Done" button is pressed I would like for the original non Module Dialog appear and to start over as if the script was started fresh.
Here is a sample that I tried:
Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Dialog>Dialog
object Dialog: TForm
Left = 257
Top = 115
HelpContext = 5000
Anchors = [akLeft, akTop, akBottom]
BorderIcons = [biSystemMenu]
Caption = 'Carrier Invintory GUI'
ClientHeight = 312
ClientWidth = 209
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -14
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesigned
ShowHint = True
OnTaskBar = True
PixelsPerInch = 120
TextHeight = 16
object MSButton1: tMSButton
Left = 56
Top = 56
Width = 97
Height = 51
Caption = 'MSButton1'
TabOrder = 8
DoBrowse = False
BrowseStyle = fbOpen
ModalResult = 10
end
object MSButton2: tMSButton
Left = 58
Top = 120
Width = 95
Height = 48
Caption = 'MSButton2'
TabOrder = 9
DoBrowse = False
BrowseStyle = fbOpen
ModalResult = 20
end
object MSButton3: tMSButton
Left = 56
Top = 184
Width = 97
Height = 49
Caption = 'MSButton3'
TabOrder = 10
DoBrowse = False
BrowseStyle = fbOpen
ModalResult = 30
end
end
EndDialog>Dialog
Show>Dialog,res1
if>res1=10
CloseDialog>Dialog
goto>IGUI2
endif
if>res1=20
CloseDialog>Dialog
GOTO>IGUI3
endif
if>res1=30
CloseDialog>Dialog
GOTO>IGUI4
endif
srt>Restart
if>res1=10
CloseDialog>Dialog
goto>IGUI2
endif
if>res1=20
CloseDialog>Dialog
GOTO>IGUI3
endif
if>res1=30
CloseDialog>Dialog
GOTO>IGUI4
endif
end>Restart
label>IGUI2
Dialog>Dialog1
object Dialog1: TForm
Left = 246
Top = 115
HelpContext = 5000
Anchors = [akLeft, akTop, akBottom]
BorderIcons = [biSystemMenu]
Caption = 'Carrier Invintory GUI'
ClientHeight = 361
ClientWidth = 235
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -14
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesigned
ShowHint = True
OnTaskBar = True
PixelsPerInch = 120
TextHeight = 16
object Label1: TLabel
Left = 56
Top = 84
Width = 130
Height = 16
Caption = 'Scan Serial Numbers:'
end
object Label2: TLabel
Left = 80
Top = 20
Width = 72
Height = 16
Caption = 'User Name:'
end
object Label4: TLabel
Left = 104
Top = 216
Width = 101
Height = 16
Caption = 'Qty Checked out:'
end
object Edit1: TEdit
Left = 32
Top = 46
Width = 170
Height = 24
TabOrder = 0
end
object Edit3: TEdit
Left = 32
Top = 110
Width = 170
Height = 24
TabOrder = 1
end
object MSMemo1: tMSMemo
Left = 41
Top = 146
Width = 56
Height = 191
VertScrollBarStyles.ButtonSize = 21
HorzScrollBarStyles.ButtonSize = 21
TabOrder = 2
end
object MSButton1: tMSButton
Left = 117
Top = 315
Width = 75
Height = 25
Caption = 'Done'
TabOrder = 3
DoBrowse = False
BrowseStyle = fbOpen
end
object Edit4: TEdit
Left = 123
Top = 238
Width = 70
Height = 24
TabOrder = 4
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,EDIT3,OnKeyDown,DoClick(1)
AddDialogHandler>Dialog1,MSBUTTON1,OnClick,Quit
AddDialogHandler>Dialog1,,OnClose,Quit
Show>dialog1,
SRT>DoClick
If>DoClick_key=13
//Do Something
Endif
END>DoClick
label>IGUI3
Dialog>Dialog3
object Dialog3: TForm
Left = 246
Top = 115
HelpContext = 5000
Anchors = [akLeft, akTop, akBottom]
BorderIcons = [biSystemMenu]
Caption = 'Carrier Invintory GUI'
ClientHeight = 282
ClientWidth = 221
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -14
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesigned
ShowHint = True
OnTaskBar = True
PixelsPerInch = 120
TextHeight = 16
object Label1: TLabel
Left = 48
Top = 12
Width = 130
Height = 16
Caption = 'Scan Serial Numbers:'
end
object Label4: TLabel
Left = 96
Top = 144
Width = 93
Height = 16
Caption = 'Qty Checked In:'
end
object Edit3: TEdit
Left = 24
Top = 38
Width = 170
Height = 24
TabOrder = 0
end
object MSMemo1: tMSMemo
Left = 33
Top = 74
Width = 56
Height = 191
VertScrollBarStyles.ButtonSize = 21
HorzScrollBarStyles.ButtonSize = 21
TabOrder = 1
end
object MSButton1: tMSButton
Left = 109
Top = 243
Width = 75
Height = 25
Caption = 'Done'
TabOrder = 2
DoBrowse = False
BrowseStyle = fbOpen
end
object Edit4: TEdit
Left = 115
Top = 166
Width = 70
Height = 24
TabOrder = 3
end
end
EndDialog>Dialog3
AddDialogHandler>Dialog3,EDIT3,OnKeyDown,DoClick3(1)
AddDialogHandler>Dialog3,MSBUTTON1,OnClick,Quit
AddDialogHandler>Dialog3,,OnClose,Quit
Show>dialog3,
SRT>DoClick3
If>DoClick3_key=13
//Do something
Endif
END>DoClick3
label>IGUI4
Dialog>Dialog4
object Dialog4: TForm
Left = 246
Top = 115
HelpContext = 5000
Anchors = [akLeft, akTop, akBottom]
BorderIcons = [biSystemMenu]
Caption = 'Carrier Invintory GUI'
ClientHeight = 209
ClientWidth = 217
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -14
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesigned
ShowHint = True
OnTaskBar = True
PixelsPerInch = 120
TextHeight = 16
object Label1: TLabel
Left = 44
Top = 10
Width = 130
Height = 16
Caption = 'Scan Serial Numbers:'
end
object Label4: TLabel
Left = 96
Top = 82
Width = 83
Height = 16
Caption = 'Qty Reported:'
end
object Edit3: TEdit
Left = 27
Top = 30
Width = 165
Height = 24
TabOrder = 0
end
object MSMemo1: tMSMemo
Left = 25
Top = 64
Width = 56
Height = 113
VertScrollBarStyles.ButtonSize = 21
HorzScrollBarStyles.ButtonSize = 21
TabOrder = 2
end
object MSButton1: tMSButton
Left = 101
Top = 155
Width = 75
Height = 25
Caption = 'Done'
TabOrder = 3
DoBrowse = False
BrowseStyle = fbOpen
end
object Edit4: TEdit
Left = 107
Top = 102
Width = 62
Height = 24
TabOrder = 1
end
end
EndDialog>Dialog4
AddDialogHandler>Dialog4,EDIT3,OnKeyDown,DoData(1)
AddDialogHandler>Dialog4,MSBUTTON1,OnClick,Quit
AddDialogHandler>Dialog4,,OnClose,Quit
Show>Dialog4,
SRT>DoData
If>DoData_key=13
//Do something
Endif
END>DoData
SRT>Quit
gosub>Restart
END>Quit