Hi,
is there an easy to get an Are you sure you want to continue message box with an automation script without building an complete ui with the uibuilder?
https://docs.dataminer.services/user-guide/Advanced_Modules/Automation/Using_CSharp/Building_interactive_Automation_scripts_with_CSharp.html
You could use the following method to show a message box (with a custom message in this case):
private static bool Confirm(IEngine engine, string message)
{
var uiBuilder = new UIBuilder();uiBuilder.Append(message);
uiBuilder.AppendButton("okBtn", "OK");
uiBuilder.AppendButton("cancelBtn", "Cancel");var uiResults = engine.ShowUI(uiBuilder);
return uiResults.WasButtonPressed("okBtn");
}
This will then return true/false depending if the user confirmed or not.
Also note that this does imply that the script is executed by a user. If not, you'll need to use "FindInteractiveClient" so a user can first attach to the script.
Hi Gerwin,
I am not sure if it will help, but a possible option is to use the action 'User interaction' (DataMiner Docs - User Interaction):
Might be an option, the rest is c# code though, but maybe i can use this. I’ll have look.
I was afread it would be indeed using the UIbuilder, but this seems simple enough 🙂