My problem is my script gets into a loop because the action of the subroutine triggers the subroutine again.
I know there is a fix for this but can't come up with it.
Suggestions?
Code: Select all
AddDialogHandler>Timer,cbFixed,OnClick,Timing(Fixed)
AddDialogHandler>Timer,cbRandom,OnClick,Timing(Random)
...
SRT>Timing
//Timing will be Fixed or Random
Let>TimingOption=Timing_Var_1
If>TimingOption=Fixed
SetDialogProperty>Timer,cbFixed,Checked,True
SetDialogProperty>Timer,cbRandom,Checked,False
Else
SetDialogProperty>Timer,cbRandom,Checked,True
SetDialogProperty>Timer,cbFixed,Checked,False
Endif
END>Timing
Code: Select all
Dialog>Timer
object Timer: TForm
Left = 640
Top = 243
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'MAKETest'
ClientHeight = 472
ClientWidth = 314
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 16
object lblTiming: TLabel
Left = 40
Top = 88
Width = 52
Height = 16
Caption = 'Timing:'
end
object cbFixed: TCheckBox
Left = 110
Top = 88
Width = 60
Height = 17
Caption = 'Fixed'
Checked = True
State = cbChecked
TabOrder = 0
end
object cbRandom: TCheckBox
Left = 192
Top = 88
Width = 80
Height = 17
Caption = 'Random'
TabOrder = 1
end
end
EndDialog>Timer
AddDialogHandler>Timer,cbFixed,OnClick,Timing(Fixed)
AddDialogHandler>Timer,cbRandom,OnClick,Timing(Random)
Show>Timer,r
SRT>Timing
//Timing will be Fixed or Random
Let>TimingOption=Timing_Var_1
If>TimingOption=Fixed
SetDialogProperty>Timer,cbFixed,Checked,True
SetDialogProperty>Timer,cbRandom,Checked,False
Else
SetDialogProperty>Timer,cbRandom,Checked,True
SetDialogProperty>Timer,cbFixed,Checked,False
Endif
END>Timing