Undocumented feature - set label text on dialogs at runtime

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Undocumented feature - set label text on dialogs at runtime

Post by Marcus Tettmar » Mon Feb 07, 2005 2:29 pm

This is undocumented. It is possible to modify the text on dialog labels. You just need to know what the internal name of the label is.

Labels are called msLabel0,msLabel1,msLabel2.....msLabeln etc. 0 being the first label placed on the dialog, 1 the next and so on. One way to determine the name is to use the debugger with GetDialogAction. When you step through past GetDialogAction you will see the dialog variables set in the watch list. Or just guess - (if you have two labels it will either be msLabel0 or msLabel1). Now you can set the label with:

Let>MyDialog.msLabel0=New Label Text
ResetDialogAction>MyDialog

This assumes your dialog is called MyDialog and it will set the first label placed on the dialog to "New Label Text".

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