Creating a Message Box in Elephant Automation Macro

Message Boxes are one of the primary methods that your macro can communicate with its users.  It should be one of the fundamental tools in your toolbox, so watch the above video to learn how to use them to their fullest extent.

In this video you’ll learn:

  • What a message box is
  • Message boxes output which button was pressed
  • Use an if-else statement to do different things depending on which button was pressed
  • Use a message box to pop-up information while programming

[TRANSCRIPTION]

Hello, Welcome to Elephant Automation, I’m Nathan Maus and in this video, we’re going to learn all about Message Boxes and how to create them.  Message Boxes are small pop up windows that contain some text, possibly a picture, and a set of buttons.  You can use them to provide information to your users.  You can use them to ask the user a question.  With a nice picture you can use them to guide your users through some of the more challenging operations they’ll face.  You can even use them as a training tool.

Here’s a simple message Box.  As you can see, we’ve got a picture, some text and a button on the bottom.  We can set the text to align in whatever way is most pleasing to us.  We can use any of the predefined lists of buttons or we can create our own custom list of buttons.  We can change the size and location of our message box, and we can also change the size of our pictures, if we choose to use them.

One powerful way to use a message box is to use it in conjunction with an if else tool.  In this way we can take the Button Pressed output of the message box and do different things based on which button was pressed.  So if we have a yes and a no button, we can do one thing if the yes button was pressed and we can do something different if the no button was pressed.  Similarly, we can have a message box with Ok and Cancel buttons, so that we can confirm if we want the Macro to continue or not.  If the button is Cancel we execute a Stop Macro and if the button is OK we proceed with the rest of the Macro.

Another useful use for the message box is as a helper for when you are programming.  You can use a message box to pop up values of key variables or to highlight where in the macros flow you are.

To see both of these examples in action, check out our video on using the Logic tools, which is linked below this video.

Thanks for watching this video, and if you liked what you saw, please like this video or share it with those who could use it.  Also feel free to ask questions in the comments section below or send us an email via our website.  Have a wonderful day and see you soon.

Leave a Reply

Your email address will not be published. Required fields are marked *