Help

We All Need a Hand Sometimes


Like Paper...or Pancakes

A stack is very much like a stack of paper (or pancakes). When you execute a Step which has a return value, that value is put on the top of the stack. You can then use the items on the stack for subsequent Steps in whatever way you need.

Lifo stack

Each time something is added to the stack, it goes on top of the previous item. So when you pop (pull) something from the stack, the value below it is the next item on the top of the stack. You can also peek (leave) whatever is currently on the top of the stack without removing it.


Example

In this example, we will get the title of the foreground window and display it in a message box. This requires 3 Steps:

  1. Get the foreground window
  2. Get the window text (title)
  3. Display the message box

 

Get Foreground Window

Get the foreground window and push it onto the top of the stack. There is now 1 item on the stack.

Steps Example 1 - Get Foreground Window

 

Get Window Text (Title)

Pull the foreground window object from the stack and get the window title, then push the title onto the stack. Since the window was removed from the stack, now only the title is on the stack.

Steps Example 1 - Get Window Title

 

Show Message Box

Pull the title from the stack to use as the message value. The stack is now empty.

Steps Example 1 - Show Message Box (message)

Use direct input for the message box title.

Steps Example 1 - Show Message Box (title)

 

Result

When we execute this Steps sequence, we see a message box with the foreground window title.

Steps Example 1 - Result