Sub topic 1
Meet the Shortcuts App and Create Your First Shortcut
Prerequisites
Assume you can use Finder, open an app, and locate files. You should also understand a step-by-step procedure. The Shortcuts app is included with macOS and lets you combine actions into a reusable workflow.
Create a Shortcut
Open Shortcuts from Applications or Spotlight. Select New Shortcut, then click the title and name it Greeting.
The editor has a search field for finding actions and a workflow area where you arrange them. Add these actions in order:
- Ask for Input, with the input type set to Text.
- Set Variable, and name the variable
Name. - Text.
- Show Result.
In the Text action, type Hello, and insert the Name variable after it. Run the shortcut with the play button. Enter a name when prompted. The final action displays the greeting.
Actions and Output
An action is one operation in a shortcut, such as asking a question, changing text, or displaying a result. Each action usually produces output. Shortcuts passes that output to the next action automatically.
For example, Ask for Input produces the text entered by the user. Set Variable stores that text under a name. Text combines fixed words with the stored value. Show Result presents the completed text.
The action order matters. If you put Show Result before Ask for Input, there is no greeting to display yet.
Variables and Magic Variables
A variable is a named place for a value. Use Set Variable when you want to reuse an action's output later or make the data flow easier to understand.
A magic variable is a shortcut reference to an earlier action's output. When an action accepts a variable, click the variable token or choose Select Magic Variable, then select the earlier action. Magic variables can hold text, files, images, dates, or other content types.
Ask for Input and Show Results
Ask for Input pauses the shortcut and collects a value. Set its type to match the expected data, such as Text, Number, or Date. Show Result displays a value while the shortcut runs, which is useful for testing and for user-facing output.
Exercise
Which action should produce the value before Text can insert it into the greeting?
Show answer
Ask for Input should run first. Its output can then be stored in Name or inserted directly as a magic variable.