Display a string in a Dialog Label

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Scones
Junior Coder
Posts: 32
Joined: Fri Jul 05, 2019 11:21 am

Display a string in a Dialog Label

Post by Scones » Thu Nov 28, 2019 10:40 am

Hi!

Anyone know how to display the result of a string in a dialog? I tried making a label with caption: %MyString%, but it just comes out as %MyString%

I did make sure that the Dialog comes after i named the string

Thanks in advance!

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Display a string in a Dialog Label

Post by JRL » Fri Nov 29, 2019 5:20 am

What version of Macro Scheduler? This will work with version 12 or later.

Code: Select all

Let>MyString=This is a dialog label with text displayed

Dialog>Dialog1
object Dialog1: TForm
  Caption = 'Dialog Example'
  ClientHeight = 200
  ClientWidth = 300
  object Label1: TLabel
    Left = 50
    Top = 50
    Width = 32
    Height = 13
    Caption = 'Label1'
  end
end
EndDialog>Dialog1

SetDialogProperty>Dialog1,Label1,Caption,MyString

Show>Dialog1,res

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts