Home Forums General XMetaL Discussion How to edit user settings in "Settings.settings" file from xft form? Reply To: How to edit user settings in "Settings.settings" file from xft form?

dcramer

Reply to: How to edit user settings in "Settings.settings" file from xft form?

I've attached an xft form that reads and writes to an environment variable and a registry value.

Look at the OnInitialize event for the text fields to see them reading from the registry and env variables. Then see the Apply button's OnClick event to see it writing the values if the user has edited them.

When the dialog opens, the fields are prepopulated with the current values (if they exist). Then the user clicks apply, the values are updated (if the user has changed them).

From any other macro  you can use RegRead and Environment methods illustrated in the text field's OnInitialize event to read the setting. What I do is read it and if it's not set, I give them an alert telling them they need to set it, then pop up this dialog. I also make the dialog available from a menu.

Hope that helps.

David

Reply

Products
Downloads
Support