No-Code Workspace — Block Reference

ActionBlock usage recipe

Swipe (SWIPE)

Performs swipe gesture on screen

Documented for app version 1.0.50Updated:

Block Preview

Captured from the in-app Visual Builder block card in the English UI.

English UI
Swipe (SWIPE) block card

Block Preview

Captured from the English Visual Builder block card with the Advanced/extra settings panel expanded.

English UI
Swipe (SWIPE) advanced settings panel

What Does It Do?

Performs a finger swipe from start point to end point. Supports swipe duration, repeat count, random offset, and multiple swipes. Used for scrolling lists/pages, opening menus, adjusting sliders.

Pro note: use path and tuning deliberately

SWIPE is not only start and end points. Waypoints, tuning, and multi-swipe modes produce more natural and reliable motion recipes.

When to Use?

1

Use when finger swipe gesture is needed:

2

Scrolling a page or list up/down

3

Swiping sideways (gallery, page transition)

4

Adjusting sliders/bars

5

Opening/closing menus (side drag)

6

Pulling down/up notification panel

How to Use?

1

"Add Block" → "Swipe (SWIPE)"

2

START POINT: "Select Start" → pick from screen

3

END POINT: "Select End" → pick from screen

4

DURATION: How long the swipe takes (ms). 300ms = fast, 800ms = slow. 200-500ms is ideal

5

REPEAT: How many times (higher for list scrolling)

6

RANDOM OFFSET: +/- pixels to coordinates

7

EXTRA SWIPES: "+ Add Swipe" adds up to 10 paths

8

SWIPE MODE: Sequential (A×N, then B×N), Simultaneous (one finger per path) or Random (one path is picked and run N times)

9

ADVANCED — START FROM MATCH: enable → no start coordinate needed, swipes from the position the previous search found (SWIPE must be on the search block TRUE branch)

10

ADVANCED — IN-MATCH JITTER: randomizes the start inside the match box; set the edge margin to test different valid swipe starts without leaving the target bounds

11

ADVANCED — LIGHTBULB BINDING: bind the start/end coordinate to a variable or Dialog value with {x} from the field's lightbulb (e.g. {matchX},{matchY})

12

Set wait before/after

Parameters

From [x, y]

Starting point of swipe. Pick from screen, manual input, or lightbulb binding to a variable/Dialog value

To [x, y]

End point of swipe. Can be bound to a variable/Dialog value with the lightbulb

Duration (ms)

Swipe time. 200-500ms ideal

Repeat

How many times to repeat

Random Offset

+/- pixels to coordinates

Extra Swipes and Swipe Mode

Up to 10 paths. Sequential: each path N times, then the next; Simultaneous: one finger per path, Repeat repeats the whole set; Random: one path is picked and run N times

Start from match

When enabled the start needs no coordinate; it goes to the LAST match found by the preceding search block. Place SWIPE on the search block's TRUE branch. Swipes to a moving/shifting target with no hard-coded numbers. End on match does the same for the end point.

In-Match Jitter (Advanced)

With "Start from match" on, drops the swipe start on a random point inside the match box instead of the dead centre. An adjustable edge margin keeps the start away from the target boundary. The bounded behavior helps validate different valid start points safely in repeated UI tests.

Coordinate Binding (lightbulb)

Instead of fixed numbers, bind the start/end X-Y to a VARIABLE or DIALOG value with {x} from the field's lightbulb (e.g. {matchX}, {matchY}). The action reads the live value, so you can build a swipe that starts from matchX/matchY written by IMAGE/TRACK_TARGET and works wherever the target appears.

Swipe behaviorComing soonv1.0.51

Counted or Endless swipes, Reverse at the ends, continue in background, forward/back speed, return distance and endpoint waits. Details and limits below

Example Usage

1

Scenario 1: Scroll list down

2

SWIPE → Start: center [540, 1200]

3

End: upward [540, 400]

4

Duration: 400ms

5

Repeat: 5 (scroll 5 pages)

6

Scenario 2: Pull notification panel

7

SWIPE → Start: [540, 0] (top of screen)

8

End: [540, 1000] (downward)

9

Duration: 300ms

10

Repeat: 1

11

Scenario 3: Pull a moving target to centre (lightbulb binding)

12

IMAGE/TRACK_TARGET finds the target and writes matchX/matchY

13

SWIPE → bind the start to {matchX},{matchY}

14

End: screen centre → drag the item in

15

Works wherever the target appears

Combinations / Used With

1

MOST COMMON COMBINATIONS:

2

SWIPE + IMAGE: Swipe then search (finding item in list)

3

SWIPE + WAIT: Swipe and wait (for animation)

4

GROUP + SWIPE: Repeated swiping in loop

5

IMAGE + SWIPE: Swipe when something is found

6

IMAGE + SWIPE (start from match): Swipe from the found position

7

IMAGE + SWIPE {matchX}: Swipe starting from matchX/matchY

8

SWIPE + TEXT: Swipe then check text

Tip

Performs swipe gesture on screen

Warnings / Cautions

1

WARNING:

2

Without selecting points, swipes from [0,0] to [0,0] (nothing happens)

3

Too short duration (<100ms) may not register

4

Very fast repeated swipes may cause issues — add WAIT between them

Step-by-Step Mastery: Basic → Advanced → Pro

The same block at three levels: a quick start, the real options, and professional techniques.

Basic

SWIPE drags a finger from a start point to an end point. The most basic use is scrolling a list up/down or paging sideways. Duration (ms) sets the speed: 200-500ms is usually ideal; too short (<100ms) may not register in some apps.

Advanced

swipeRepeat repeats the same swipe several times (high value for list scanning). randomSwipe adds +/- pixels to the coordinates. swipeWaypoints draws a curved path through intermediate points instead of a straight line; use it to test path coverage and route around obstacles in draggable components. The real fine-tuning is PER-POINT TUNING: swipeStartTuning and swipeEndTuning (each a SwipePointTuning) give that point a holdMs (hold the finger there), speedMs (the speed of that segment) and offset (a nudge); swipeWaypointTunings applies the same to each intermediate point. A holdMs at the start gives a "press then drag" (drag-and-drop pickup), a holdMs at the end gives a "settle before release"; speedMs lets you build ramps (start slow, accelerate). Start from match (swipeOnMatch) pins the START to the found match centre and End on match (swipeEndOnMatch) pins the END to the match — no hard-coded numbers. extraSwipes + multiSwipeMode run multiple swipes sequential (Repeat runs each path N times before the next), simultaneous (one finger per path; Repeat repeats the whole set) or random (one path is picked and run N times). {x} from the field's lightbulb ties start/end to variables like {matchX},{matchY}.

Pro

Combining curve + ramp + hold gives a controlled drag-and-drop path: define the path with swipeWaypoints, set the take-off with swipeStartTuning.speedMs, the segment speeds with the waypoint tuning values, and the pause before release with swipeEndTuning.holdMs. Classic drag-and-drop pattern: swipeStartTuning.holdMs ~300ms (grab the item) → carry via waypoints → swipeEndTuning.holdMs ~200ms (let it settle before release). An advanced option is swipeUseMovingColorMotion: it steers the swipe along the motion vector a MOVING_COLOR block captured (it only engages while that vector is tied to the active match) — you build a dynamic swipe that follows a moving target, and it falls back to the block's fixed/match path otherwise. swipeOnMatch/swipeEndOnMatch only work when CLICK/SWIPE sits on a search block's TRUE branch; with no active match the swipe is skipped and a warning is logged. The generated Lua is a `swipe({GesturePoint(...), GesturePoint(...)}, {...})` call, and the accessibility dispatch path floors EVERY gesture duration at 60ms — a shorter value never produces a sub-60ms swipe. For rapid back-to-back swipes, insert a WAIT between them so some apps don't merge and drop swipes.

Real-World Scenarios — Step-by-Step Recipes

Small, reproducible examples that combine several blocks — build them straight into your own macro.

Scan a list to find an item
  1. 1Create a GROUP loop
  2. 2Add IMAGE inside, scan for the wanted item → on found do BREAK or CLICK
  3. 3If not found add SWIPE: start [540,1200], end [540,400], duration 400ms
  4. 4Add a short WAIT 300ms after SWIPE
  5. 5The loop scrolls the list until the item appears
Drag a moving target to centre
  1. 1Find the target with IMAGE or TRACK_TARGET (writes matchX/matchY)
  2. 2Add SWIPE
  3. 3Bind the start to {matchX},{matchY} via {x}
  4. 4Set the end to the screen centre
  5. 5It drags from wherever the target appears toward centre
Drag-and-drop: grab, carry, settle, release
  1. 1Add SWIPE: start = item, end = target slot
  2. 2swipeStartTuning.holdMs ≈ 300ms (grab so the drag begins)
  3. 3Add one or two swipeWaypoints (curve the path)
  4. 4swipeEndTuning.holdMs ≈ 200ms (settle before release)
  5. 5Keep swipeDuration 500-700ms and start slow via speedMs
Swipe that starts from a match (no hard-coded numbers)
  1. 1Search the item to drag with IMAGE/TEXT
  2. 2Add SWIPE on its TRUE branch
  3. 3Enable swipeOnMatch (start = match centre)
  4. 4Set the end to a fixed slot or another variable via {x}
  5. 5It swipes from wherever the item is; if no match, it skips
Endless back-and-forth swipe in the backgroundComing soonv1.0.51
  1. 1Add SWIPE and pick the start and end points
  2. 2Swipe behavior → Swipe type: ∞ Endless
  3. 3At each end: ⇄ Reverse (A→B→A without lifting)
  4. 4Flow: Continue in background
  5. 5Set the move duration (ms); optionally set Auto-stop (s)
  6. 6Later CLICK blocks keep running; Touch Break or Stop lifts the finger
Several fingers swiping at onceComing soonv1.0.51
  1. 1Add SWIPE; choose Counted moves or ∞ Endless as the swipe type
  2. 2Add extra paths with + Add Swipe (up to 10 paths)
  3. 3Extra paths: Together (one finger per path) or One after another (one finger walks the paths in turn)
  4. 4Flow: Continue in background
  5. 5Waypoints, point hold/speed and the ±px offset are not available in this mode; tap Clear for leftovers
Fast forward, slow and short way backComing soonv1.0.51
  1. 1Add SWIPE and pick the start and end points
  2. 2Swipe behavior → Swipe type: Counted moves or ∞ Endless
  3. 3At each end: ⇄ Reverse
  4. 4Speed → Forward: Fast, Back: Slow (or Custom to type the ms)
  5. 5Return distance: for example 50% (after the first move the finger then swings between that point and the end)
  6. 6Optionally, Advanced → Wait at the end / Wait at the return point (ms)

Which Blocks to Pair With — Pro Combinations

This block is useful on its own — but it shines when paired with the right partners.

+ IMAGE / TEXT

Swipe, then use a search block to check whether the wanted content appeared; this is the backbone of list-scanning loops.

+ WAIT

Add WAIT after a swipe so animation/momentum settles; otherwise the next step reads a still-scrolling screen.

+ GROUP

Repeated swipe + search in a GROUP loop; the most common structure for auto-scanning long lists.

+ MOVING_COLOR

With swipeUseMovingColorMotion the swipe follows the motion direction MOVING_COLOR captured; it tracks moving targets. MOVING_COLOR writes the motion vector and SWIPE reads it — it only engages while the vector is tied to the active match, otherwise it falls back to the fixed/match path.

+ IMAGE / TEXT (TRUE branch)

swipeOnMatch/swipeEndOnMatch only work when SWIPE is on a search block's TRUE branch; this is how you find the item to drag and swipe from it.

Common Mistakes and Fixes

Using SWIPE without picking start/end swipes from [0,0] to [0,0], so nothing happens. Set both points or enable "Swipe on Match".

Setting the duration too short (<100ms) makes the gesture look like a tap and may not register as a swipe. Stay in 200-500ms.

Very fast repeated swipes can build momentum or get dropped in some apps. Add WAIT between them.

Using swipeOnMatch/swipeEndOnMatch OUTSIDE a search block's TRUE branch: with no active match the swipe is silently skipped and only a warning is logged. Always place these flags on an IMAGE/TEXT/COLOR TRUE branch.

Setting swipeStartTuning/swipeEndTuning.holdMs too high (e.g. 2000ms) turns the swipe into a long-press and can trigger selection/menus in some lists. 200-400ms is enough for drag-and-drop.

Coming soonv1.0.51If the macro ends right after a background endless swipe, the finger lifts with it. Keep later blocks or a loop running while it should continue; stop it with Touch Break, Stop or Auto-stop.

Pro Tips

Coming soonv1.0.51The lightbulbs bind Auto stop, return duration, return distance (%) and endpoint pauses. Out-of-range motion values are clamped with one warning per field and run.

Use swipeWaypoints to define a controlled curve instead of a straight line; explicit intermediate points make it easier to verify a route around obstacles in draggable components.

In list-scan loops, search BEFORE each swipe; if the item is on screen you avoid an extra swipe and don't overshoot with momentum.

Fixed coordinates break on a new device/resolution; binding start/end to variables via {x} makes the macro portable.

For a ramp effect keep speedMs high at the start (slow), low in the middle (fast), and high again at the end: this gives a smooth ease-in/ease-out speed profile, useful when a draggable component needs a slow pickup. Use holdMs only when you need a drag-and-drop grab or an end-settle.

Coming soonv1.0.51While background fingers are held, later CLICK and Single swipe touches and MULTI_GESTURE Pinch In, Pinch Out and Rotate are added to the same gesture; the held fingers lift for a moment and press again at the same spot. Refused meanwhile: TOUCH Down/Move/Up, a TOUCH whose Finger / Pointer is bound to a variable or repeated within the block, a multi-point CLICK in Simultaneous mode, Custom MULTI_GESTURE, Replay and custom code that calls low-level Touch functions. Add Touch Break before them.

Coming soonv1.0.51Limits: move duration 20–30000 ms; Counted allows up to 1000 moves and 10 min in total; Auto-stop 0–86400 s; back time 0 (same as forward) or 20–30000 ms; return distance 1–100%; endpoint waits 0–10000 ms; Wait between repeats up to 60000 ms. Background fingers need Android 8.0 or newer; they are released when the screen rotates or changes or when they cannot be kept for 30 s, and the macro continues.

Coming soonv1.0.51In Single swipe mode, Wait between repeats (ms) adds a pause between swipes when Repeat is above 1; it can be bound with the lightbulb.

This Block's Code (Editor View)

Lua

The Lua below is what the Code Editor generates for this block with sample settings. Adding cases, branches, actions or loops, or changing settings, extends the generated code accordingly. Study it to see what the block does under the hood, to learn Lua, or to copy and adapt it. Use the Copy button (top-right) to paste it into the Code Editor, or “Try in Editor →” to run it in the live editor.

local _swDur = 500
if _swDur < 20 then _swDur = 20 end
local _swipe_ok1 = swipe({GesturePoint(Point(100, 100), 0, 0), GesturePoint(Point(300, 300), 0, _swDur)}, { repeatCount = 2, waitNextMs = 0 })
if not _swipe_ok1 then
 error("SWIPE action returned false: SWIPE")
end

Note: generated code can evolve across versions; helper names (e.g. _reg1, m1) and internal optimizations may change. The logic and the called APIs reflect the block’s behavior.

Block ↔ Lua Mapping →

Shared Controls for This Block Family

The guidance below is not identical for every block. It summarizes the professional controls that most often repeat in the selected block family.

📍Target Point or Match Center

Choose clearly between a fixed coordinate, "act on match" (the position the previous search found), or an {x}-bound variable/dialog value to define where the action executes. Binding {matchX},{matchY} does not break across devices or resolutions.

🎛Duration and Repeats

Hold time, repeat count, and inter-action delay shape how aggressive or natural the action feels.

🎲Small Offset

Random offsets or waypoints help validate fixed-coordinate tests across different screen layouts. "In-Match Jitter" randomizes the tap inside the match box and uses the configured margin to stay away from target boundaries. Keep repeated UI tests bounded and record a visible result.

🪜Before and After Waits

Before-waits let UI settle before the action; after-waits let the next block see the updated screen state.

Builder vs Lua Boundary

Raw touch pointer lifecycle stays code-first

TOUCH and TOUCH_BREAK cover recipe-style touch flows. Raw pointer choreography such as Touch.down, Touch.move, Touch.up, Touch.dispatch, Touch.reset, Touch.breakAll, and Touch.releaseAfter is not exposed as a first-class builder block.

Touch.downTouch.moveTouch.upTouch.dispatchTouch.resetTouch.breakAllTouch.releaseAfter
Bounded dialog design is builder-backed; freer composition stays code-first

The DIALOG block and dialog designer cover a bounded field set in the builder: Info Text, Text Input, Checkbox, Description, Radio Group, Dropdown, Multi Select, Tab Group, Date Time, Number Range, Slider, Image Picker, Color Picker, File Picker, Recorder Picker, Tag, Signature, and Spacer. The buttons are designed too: the Positive button and Negative button tabs set each button’s text, background, and border color, corner radius, and minimum height next to a preview. Freer Setting.builder composition, multi-step wizard flows, and mixed HUD/dialog choreography still do not map 1:1 into the builder.

Coming soonv1.0.51Two more fields: Agent Detect references (agent_detect_editor) lets the user pick a saved reference set or add and edit references, and Save confirms the selection; Navigation setup editor (navigation_editor) edits a saved map, marker and route from the Dialog and returns the setup and route selection without moving the character.

Setting.builderDialogHudTextViewAgentDetectEditorNavigationEditor
Advanced HTTP request chaining stays code-first

HTTP_GET, HTTP_POST, and HTTP_PUT cover common fixed-method flows; HTTP_REQUEST covers one bounded request with method, header lines, body, content type, query parameters (GET and DELETE), timeout, and a bounded retry. These blocks never throw; they write the status code (-1 on a network failure). Cookie handling, chained request objects, and lower-level client flows still need the code editor.

Request()Request.setCookieRequest.getCookiesCUSTOM_CODE
General programming surfaces stay code-first

The MAP, LIST, JSON_PARSE, REGEX_MATCH, and METRICS blocks cover the everyday cases: map actions, a static list, reading a value from a JSON path, regex match, find, replace, and split, and metrics actions. The rest of the Map, Array, JSON, Regex, and Metrics APIs (for example Array sort, filter, and map) is broader than the builder recipe model and stays on the CUSTOM_CODE and code editor side.

MapArrayJSONRegexMetrics
Low-level runtime and Lua composition stays code-first

Runtime helpers, raw Request objects, Lua built-ins such as print/pcall/xpcall, and free-form object chaining patterns are represented through CUSTOM_CODE or the code editor.

RuntimeRequestprintpcallxpcallCUSTOM_CODE

Debug Mode and Breakpoints

Each block card now exposes an independent breakpoint toggle. When enabled, the breakpoint preference is stored with the block.

Breakpoints are only emitted into runtime code when Debug Mode is enabled from Visual Builder settings. When Debug Mode is off, breakpoints stay saved but do not pause execution.

Use ASSERT for fail-fast validation, and use breakpoints for step-by-step tracing and controlled pauses in the same flow.

Variable Scope

1

Variables defined with SET_VARIABLE are accessible throughout the macro (global scope). All blocks can read/write the same variable.

2

However, a variable defined inside a GROUP will be 'nil' (undefined) until the GROUP executes. Blocks outside the GROUP using this variable may produce unexpected results.

3

FOR_EACH loop variables (item and index) only carry valid values inside the loop body. Outside the loop they are outside local scope and should not be used.

4

TRY_CATCH error variable is only valid within the catch block. If the try block succeeds, the catch branch is not entered and the error variable remains undefined.

5

TIP: Before using a variable inside a GROUP, assign a default value with SET_VARIABLE outside the GROUP. This way the variable won't be nil even if the GROUP has not run.

Inline Expressions

You can embed variable values and calculations into text fields using {{ expression }} syntax. Expressions inside double curly braces are evaluated as Lua code and the result is inserted into the text.

Syntax
{{ expression }}
Examples
Skor: {{ score + 1 }} → "Skor: " .. tostring(score + 1)
{{ name }} kazandı! → tostring(name) .. " kazandı!"
X:{{ x }} Y:{{ y }} → "X:" .. tostring(x) .. " Y:" .. tostring(y)
Supported Blocks
SET_VARIABLELOGCOMPARECLIPBOARD_WRITENOTIFY_TOASTKV_SET
Security Note

Expressions are checked by the sandbox policy. Security-sensitive calls like loadstring, require, debug are automatically blocked.

General Tips

1

Keep scan regions as small as possible — improves speed, reduces false matches.

2

Always add an exit condition when using infinite loops (BREAK, timeout, or conditional exit).

3

Use network operations and error-prone steps inside TRY_CATCH.

4

If you need global error handling, use the Error Handler (ERROR_HANDLER) block as a singleton in the project.

5

Small coordinate offsets (CLICK/SWIPE) improve tap accuracy across different DPI and screen scales.

6

Customize macros with Dialog block — different parameters each run.

7

Define repeating steps once with GROUP_CALL, call from many places.

Cross-macro local library

Local Shared Macro Area

The Local Shared Macro Area moves blocks, variables, dialog fields, gallery assets, and imported media dependencies between macros on the same device. It is device-local, not cloud sync, not Firebase sharing, and not a replacement for public macro sharing.

Professional usage model: put a reusable login flow, common scan region, shared dialog form, variable group, template image, color profile, replay recording, or imported PLAY_SOUND media file into the shared area from one macro, then import it from the relevant + menu in another macro.

VISUAL_BLOCKSVARIABLESDIALOG_FIELDSTEMPLATE_IMAGECOLOR_SWATCHREPLAY_RECORDMEDIA_FILE
1

Send to the shared area

When one item or a multi-selection is active, the shared-area button can copy the selected part from the workspace, group, true/false action branch, dialog, and variables surfaces into the device-local library.

2

Import into another macro

The shared-area entry under the + menu imports the selected item into the surface that opened it. Main workspace, group, action branch, dialog, and variables each receive the compatible item type.

3

Share gallery assets

Gallery items include template images, color swatches, replay records, and imported audio/media files. They can move between macros on the same device so repeated templates, colors, recordings, and PLAY_SOUND media assets do not need to be captured again.

4

Keep it clean

The shared area is not a permanent dumping ground. Delete stale shared items from the shared-library panel; imports create a copy in the target macro and do not rewrite the source macro flow.

Checkpoint: after importing, review block names, linked template/image/color/record/media assets, and variable names in the target macro. The shared area creates a copy; delete stale shared items from the shared-library panel to keep the library clean.

AI assistant

Build a block chain with MH AI in natural language

Tell MH AI what you want in plain language; it proposes the right block sequence and lands it in the workspace after you approve. In the current release it works with cloud providers such as Gemini, Claude, and OpenAI; on-device local models are on the roadmap.

Learn more →