Variables & Subflows BETA

Reuse Auto Clicker Steps with Variables and Subflows

Keep changing values separate from the steps and turn a repeated block of actions into one checked subflow.

By Osenpa Published Reviewed

Short answer

A variable is a named value, such as text, a number, or a screen position. A subflow is a named group of steps that another part of the automation can run.

Use a variable when a value changes between runs. Use a subflow when the same tested sequence appears in more than one place.

Variables & Subflows is labeled BETA

The feature checks value types and call chains before a run. First make a short workflow work without reuse, then extract only a block that truly repeats. Keep important runs supervised.

Reuse one safe text-entry block

1. Make the plain steps work

In a harmless test window, build one click, one Type Text action and one short delay. Run the three steps once. You should see the sample text entered in the intended box.

Variables and Subflows screen with controls to save a typed value and an empty variable list.
Use Save a value to create one named value before you reuse it in a step or subflow.

2. Create one text variable

Open Variables & Subflows. Add a Text variable named customer_name. Set it to Sample Name. You should see the name, type and value together in the variable card.

3. Use the variable in Type Text

Replace the sample text in Type Text with ${customer_name}. Run the step once. You should see Sample Name in the test box.

4. Build one subflow

Create a subflow named Fill sample name. Add the checked click, Type Text and delay steps. You should see the three actions in that subflow in the same order.

5. Add one subflow call

Add Call Subflow to Steps and choose Fill sample name. Run the call once. You should see Sample Name entered once. Keep the original steps until this call passes the test.

Variable, parameter and subflow referenceOpen this when you need the exact difference between the three building blocks.

Understand the three building blocks

Variable

A variable has a name, type and value. Text stores words, Number stores a numeric value, and Coordinate keeps X and Y together. A supported field can use syntax such as ${customer_name}.

Profile parameter

A profile parameter is a value supplied when the profile runs. It can be optional with a default or required. A required value prompts for the current run and is not silently saved as a new default.

Subflow

A subflow is a named group of steps. Typed arguments let the same steps use different text, numbers or coordinates without copying the action list.

Advanced subflow workflowUse this process after the first safe text-entry example works.

Turn repeated steps into a reusable subflow

1. Find exact repetition

Look for two or more copies of the same action block. If the blocks behave differently, keep them separate until the difference is understood.

2. Mark what changes

Separate values from actions. For example, a customer name is Text, a retry count is Number and a click point is Coordinate. Give each value a short name that describes its purpose.

3. Create typed variables

Create the values in Variables & Subflows. A number-only field rejects a text variable, and a coordinate keeps X and Y together. Type checking prevents a mismatched value from being silently treated as something else.

4. Build the subflow

Name the reusable block by its result, such as Fill sample name, rather than by its position. Add or import the steps you checked, then define only the arguments the block actually needs.

5. Replace copies with calls

Add a Call Subflow action where the repeated block used to be. Map each argument to a compatible value. Test one call before replacing every copy.

6. Test errors as well as success

Try a missing required value and a wrong type in a harmless copy. The run should stop before input begins. Direct or indirect recursion and an overly deep call chain are also blocked before execution.

Checkpoint: test one caller first

Keep the original steps until one subflow call works with a valid value and stops safely for a missing or wrong value. Replace the remaining copies only after both paths are clear.

Rename, delete and storage behaviorHow references are kept safe.
  • Renaming a variable or subflow updates references that can be changed safely.
  • A referenced item cannot be deleted until its uses are removed.
  • A missing subflow, wrong argument type or recursive call is rejected before the workflow sends input.
  • Profiles can store the document, run options, variables, subflows and profile parameters. Treat regular profile values as local workflow data, not as a password vault.
  • A portable .osenpaprofile file can carry Steps, Run Options, variables, subflows, profile parameters, detector settings and supported embedded image or audio references. It is intended to move one saved profile.
  • Complete JSON export is a different editable workflow document transfer. Review either kind of imported workflow before running it.
  • Input Variation can only make small timing or click-position changes within the limits you set after workflow decisions. It does not alter variables or subflow logic and is not a bot-protection bypass.
Watch for

Reuse mistakes

  • Creating variables for values that never change
  • Giving a text value to a numeric field
  • Extracting a subflow before the original steps work
  • Using a profile as storage for secrets
Verify the result

Reuse checks

  • Every variable has the narrow correct type.
  • Required values prompt without changing saved defaults.
  • A missing or wrong argument stops before input begins.
  • One subflow edit reaches every valid caller.
  • Re-test every caller after changing a value type, argument, subflow or starting state.
  • F12 stops a harmless test immediately.
Osenpa Auto Clicker workflow with recorded steps
Variables & Subflows BETA

Osenpa Auto Clicker

Use typed values and reusable blocks to reduce repeated setup inside a supervised workflow.