Creating a multi action macro button

Getting started with Touch Portal

Touch Portal is capable of making complex and powerful buttons. One of the core aspects of this is the ability to stack actions to make a button do multiple things with one press.

Step 01: Adding our first action to our button

We start by adding an action that will start up an application. In this case it will start the windows snipping tool.

While this is already very handy, I use this tool usually to make a screenshot right away so let's make this button a bit more usefull.

Step 02: Adding a timer

We want to start a new snapshot session when the application has started. When the snipping tool is open and active we can use the short keys Control + N to create a new snapshot session. But we cannot do that yet. First we need to make sure the snipping tool application is running and for this we need a bit of logic.

We need to add a wait function in between which can be found in the logic section of the action list. Click on this action to add it to the list of action the button will executed.

This is also a good moment to explain a bit on the action flow of a button. When you add actions in the list of the ON PRESS category, they will be executed in order. This means the first action will be triggered and when this has been done, the second will be executed and so on. Do understand that the action is executed but it does not wait for any result. In our case it has triggered the start of the snipping tool application and continues on to the next action in the queue. It does not wait for the application to actually be fully started. We need the timer for this in our current button, let's add it:

So in my case waiting for 1 second (= 1000 milliseconds) is enough for the snipping tool to start up and to be ready for use. Play around with this number for your own situation, faster computers need less, slower computers need more.

Step 03: Start a snapshot session

To start a new snapshot session, the only thing we have to do is press the Control key + the N key. Luckily Touch Portal is capable of doing this as well.

We have added the virtual key press action with the combination Ctrl + N.

End Result

When we press this button it will now start up the snipping tool. Then it will wait for 1 second just to be sure the snipping tool has been started. When this waiting is over we let Touch Portal send a Ctrl+N key press combination to create a new snapshot session and we can select a region on the screen right away.

This shows the core power of multi action macro buttons on Touch Portal.

Back to Guide Overview