Hi ihave been workking with Macro Scheduler fr a littl while (Vers 9)
and have just updated to vers 12.0.7
i have been reading up on the forums but I have not foundany thing to help
getting used to the new dialog box design
The problem I am having is when i run the dialog the cation on the label will not appear
what I get in the dialog box is
%Dialog1.what% where the cation should be
Any ideas .. script s below
Dialog>Dialog1
object Dialog1: TForm
Left = 697
Top = 119
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 185
ClientWidth = 193
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 what: TLabel
Left = 40
Top = 24
Width = 130
Height = 13
Caption = 'Select from the tasks below'
end
object MSButton1: tMSButton
Left = 50
Top = 50
Width = 75
Height = 25
Caption = 'Call Us'
DoubleBuffered = True
ModalResult = 4
ParentDoubleBuffered = False
TabOrder = 0
DoBrowse = False
BrowseStyle = fbOpen
end
object MSButton2: tMSButton
Left = 50
Top = 80
Width = 75
Height = 25
Caption = 'Dishonour'
DoubleBuffered = True
ModalResult = 5
ParentDoubleBuffered = False
TabOrder = 1
DoBrowse = False
BrowseStyle = fbOpen
end
object MSButton3: tMSButton
Left = 50
Top = 110
Width = 75
Height = 25
Caption = 'Suspension'
DoubleBuffered = True
ModalResult = 6
ParentDoubleBuffered = False
TabOrder = 2
DoBrowse = False
BrowseStyle = fbOpen
end
object MSButton4: tMSButton
Left = 50
Top = 140
Width = 75
Height = 25
Caption = 'Cancellation'
DoubleBuffered = True
ModalResult = 7
ParentDoubleBuffered = False
TabOrder = 3
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
Dialog box Label capton wont stay
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
If I run this with Show>Dialog1,r I see "Select from the tasks below" in the label.
If you want to change the caption of the label use the SetDialogProperty function:
SetDialogProperty>Dialog1,what,Caption,This is a new caption
If you want to change the caption of the label use the SetDialogProperty function:
SetDialogProperty>Dialog1,what,Caption,This is a new caption
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Thanks for the quick reply
That also works for me... but i seem to be approching it a little differently
I did forget to add the next part of my code.
I am trying to have it so the box will stay open on the screen all the time. once the button is clicked it will refer to another macro to proform a task.
but then reset the dialog action so that it is ready for the next action to occur.
'starts the Dialog box
show>Dialog1
Label>RepeatDialog1
GetDialogAction>Dialog1,SMS
'results of buttons pushed
if>%SMS%=2
goto>THEEND
endif
if>%SMS%=4
mdl>call us SMS
MAC>\\int\GroupData\WorkersComp\Ctprta\Team\Macros\V12Scripts\V12SMSCALLUS.scp
ResetDialogAction>Dialog1
endif
'tell dialog to loop
goto>RepeatDialog1
'label to stop macro
Label>THEEND
That also works for me... but i seem to be approching it a little differently
I did forget to add the next part of my code.
I am trying to have it so the box will stay open on the screen all the time. once the button is clicked it will refer to another macro to proform a task.
but then reset the dialog action so that it is ready for the next action to occur.
'starts the Dialog box
show>Dialog1
Label>RepeatDialog1
GetDialogAction>Dialog1,SMS
'results of buttons pushed
if>%SMS%=2
goto>THEEND
endif
if>%SMS%=4
mdl>call us SMS
MAC>\\int\GroupData\WorkersComp\Ctprta\Team\Macros\V12Scripts\V12SMSCALLUS.scp
ResetDialogAction>Dialog1
endif
'tell dialog to loop
goto>RepeatDialog1
'label to stop macro
Label>THEEND
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You should NOT use GetDialogAction or ResetDialogAction for v12 style dialogs. That is probably the cause of your problem. Do not use them. Forget they exist. You never need them and they are only designed to work with the old v11 style dialogs. Use GetDialogProperty to get a property value and SetDialogProperty to set one.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?