{"data":{"version":"v2.97","locale":"en","availableLocales":["en","vi","th","id","fil"],"updatedAt":"2026-11-04T08:35:42.187Z","contract":{"keywords":["if","else","for","while","def","class","return","global","pass","lambda","in","is","and","or","not","break","continue","True","False","None"],"allowedImports":["cognitab","random","math","time"],"builtinHelpers":["enumerate","zip","len","int","float","str","type","print","bool","abs","sum","min","max","sorted","round","sqrt","pow","floor","ceil","sin","cos","tan","log","clamp"],"functionAliases":{"sleep":"wait"}},"guides":{"concurrency":{"title":"Concurrency and execution","sections":[{"id":"overview","title":"Concurrency and execution","body":"A flow runs lines in order. “Blocking” means its next line waits, not that the app freezes. Flow.start() runs another flow alongside it; parallel=True only queues a touch.","example":null},{"id":"flows","title":"Background flows","body":"Flow.start() returns a positive Int once the named flow can receive messages; at most two background flows run together. send() copies messages in order; receive() waits, poll() checks now. Pause keeps messages; stop/completion discards them. running() includes paused flows. Flow.stop(name) stops a background owner; peers continue and its name stays reserved until cleanup ends. Named nested groups share their owner’s messages and stop target; the main flow cannot be stopped this way and has no automatic name. The macro waits for workers: stop endless workers explicitly. Main Pause/Resume affects all flows; global Resume clears individual pauses. Background controls offer Pause/Resume, no Stop button. Invalid/duplicate starts, any flow error, Main Stop or System.stop() stop the whole macro.","example":"# Configure a macro flow named watch_enemy before running\nordinal = Flow.start(\"watch_enemy\", {\"task\": \"status\"})\nprint(ordinal)"},{"id":"shared-state","title":"Shared state","body":"Keep changeable objects separate per flow. Storage protects each operation, including edits inside collections, but another flow can write between get() and set(). Use one writer to avoid overwriting updates. Screen capture, image reuse and audio settings are shared. Exchange copied messages with Flow.send(), receive() and poll().","example":null},{"id":"touches","title":"Queued touches","body":"parallel=True queues a touch without waiting for completion; delay_before, delay_after still wait outside collect mode. Touch.collect() gathers, Touch.send() sends, and Touch.wait() waits. Different flows’ gestures can cancel each other on the shared screen. Cancelling active gestures requires Android 8 or newer.","example":"# Collect overlapping touches, then wait for completion\nTouch.collect()\nclick((300, 900), hold_ms=1500, parallel=True)\nclick((780, 900), delay_before=500, parallel=True)\nTouch.send()\nTouch.wait()"},{"id":"recognition-ui","title":"Recognition and UI waits","body":"Region.find* searches for appearance; Region.wait* waits for disappearance. Even one check takes time; repeat rates are 1–60 checks/second. MacroPanel dialogs wait, one at a time. show(mode=\"floating\") continues with one floating panel per run; read controls with values(), remove with close(). OverlayText.off_all() removes only this flow’s overlays; display updates may wait.","example":null}]}},"entries":[{"key":"class-audio","kind":"CLASS","parentKey":null,"name":"Audio","signature":"Audio(name)","description":"A read-only audio value for recognizing sounds in an app or game. Use Audio(name) to load a saved sample, or Audio.recent(duration_ms) to copy recently captured audio. Capture and matching run on the device; continuous listening buffers are never uploaded and scripts cannot access raw audio (PCM).","behavior":"A read-only audio value for recognizing sounds in an app or game. Use Audio(name) to load a saved sample, or Audio.recent(duration_ms) to copy recently captured audio. Capture and matching run on the device; continuous listening buffers are never uploaded and scripts cannot access raw audio (PCM).","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["name","duration_ms","start_ms","end_ms"],"fieldDocs":[{"name":"name","type":"String | None","defaultValue":null,"description":"Saved sample name, or None for a recent snapshot.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"duration_ms","type":"Number","defaultValue":null,"description":"Snapshot length in milliseconds.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"start_ms","type":"Number","defaultValue":null,"description":"Start time in milliseconds; zero for a named sample, session-relative for a recent snapshot.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"end_ms","type":"Number","defaultValue":null,"description":"Exclusive end time in milliseconds on the same timeline as start_ms.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"name","type":"String","defaultValue":null,"description":"Required non-empty name of a sample created in this macro's Template Manager, not a file path. Loads immediately, including restored samples and samples in encrypted protected packages; missing or corrupt samples are errors. Backup/Store saves the selected source package and saved samples with the macro: at most 32 PCM16 mono 48 kHz WAV samples, each up to 10 seconds, and 4 MiB of WAV data in total.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":"# Load a sample saved in this macro\naudio = Audio(\"alert\")","params":[],"returnType":null,"returnDescription":null,"example":"# Recognize a local audio sample after listening starts\nsample = Audio(\"alert\")\nAudio.start()\nwait(2000)\nclip = Audio.recent(duration_ms=2000)\nresult = clip.match(sample, threshold=0.85)\nif result.matched:\n    print(result.score, result.start_ms, result.end_ms)\nAudio.stop()","aliases":[],"group":null},{"key":"class-audio-static-method-start","kind":"STATIC_METHOD","parentKey":"class-audio","name":"start","signature":"Audio.start()","description":"Start listening to the selected app, never the microphone. Requires Android 10+, recording permission, MediaProjection consent and a source that allows capture. Calling again while listening preserves the buffer. Starting again after stop resets the session timestamps; reset any saved detection timestamp too. Pause clears history, but Resume keeps the original session time origin and includes the paused interval. Missing permission, configuration or capture session is an error.","behavior":"Start listening to the selected app, never the microphone. Requires Android 10+, recording permission, MediaProjection consent and a source that allows capture. Calling again while listening preserves the buffer. Starting again after stop resets the session timestamps; reset any saved detection timestamp too. Pause clears history, but Resume keeps the original session time origin and includes the paused interval. Missing permission, configuration or capture session is an error.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":"# Start configured app audio capture after permission and consent\nAudio.start()","aliases":[],"group":"FLOW"},{"key":"class-audio-static-method-stop","kind":"STATIC_METHOD","parentKey":"class-audio","name":"stop","signature":"Audio.stop()","description":"Stop audio capture and clear its buffer. Previously returned audio values remain usable; screen capture used elsewhere keeps running. Macro completion also releases audio capture.","behavior":"Stop audio capture and clear its buffer. Previously returned audio values remain usable; screen capture used elsewhere keeps running. Macro completion also releases audio capture.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":"# Release the configured audio recorder\nAudio.stop()","aliases":[],"group":"FLOW"},{"key":"class-audio-static-method-recent","kind":"STATIC_METHOD","parentKey":"class-audio","name":"recent","signature":"Audio.recent(duration_ms)","description":"Copy the most recent audio into an independent snapshot without waiting for more data. Only the latest 10 seconds are available; audio played before listening started cannot be recovered. Insufficient history or an unavailable recorder is an error. Silence alone does not prove the source app blocks capture.","behavior":"Copy the most recent audio into an independent snapshot without waiting for more data. Only the latest 10 seconds are available; audio played before listening started cannot be recovered. Insufficient history or an unavailable recorder is an error. Silence alone does not prove the source app blocks capture.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"duration_ms","type":"Number (1..10000)","defaultValue":null,"description":"Required whole duration from 1 to 10000 milliseconds.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Audio","returnDescription":null,"example":"# Source app must be playing; keep at least 500 ms of history\nAudio.start()\nwait(600)\nclip = Audio.recent(500)\nprint(clip.duration_ms)","aliases":[],"group":"FLOW"},{"key":"class-audio-method-match","kind":"METHOD","parentKey":"class-audio","name":"match","signature":"audio.match(sample, threshold)","description":"Find the best match for sample inside this audio and return its similarity score. Silence is not a match; missing parts of the sound lower the score. A sample longer than this audio is an error. This does not recognize speech or correct speed or pitch. Choose thresholds using separate recordings and check them again after matcher updates.","behavior":"Find the best match for sample inside this audio and return its similarity score. Silence is not a match; missing parts of the sound lower the score. A sample longer than this audio is an error. This does not recognize speech or correct speed or pitch. Choose thresholds using separate recordings and check them again after matcher updates.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sample","type":"Audio","defaultValue":null,"description":"Reference audio value to locate inside this audio value.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number (0..1)","defaultValue":null,"description":"Required finite number from 0 to 1. Calibrate with independent recordings; 0.85 is an example, not a recommended universal threshold.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"AudioMatch","returnDescription":null,"example":"# Save an alert sample in Template Manager before running this example\nsample = Audio(\"alert\")\nAudio.start()\nwait(1500)\nclip = Audio.recent(1500)\nresult = clip.match(sample, 0.85)\nprint(result)\nAudio.stop()","aliases":[],"group":"FLOW"},{"key":"class-audio-method-find","kind":"METHOD","parentKey":"class-audio","name":"find","signature":"audio.find(timeout_ms, threshold)","description":"Wait for this sample in new audio and return a matching AudioMatch, or None if the recording window ends without a match. Only audio received after the call starts is searched; recognition is not guaranteed.\nStarts listening if needed, with the same requirements as Audio.start(), and keeps listening until Audio.stop() or macro completion. Processing may finish after timeout_ms. A timeout of 0 returns None without starting capture.\nMacro Pause discards pending audio and pauses the timeout; Resume searches new audio. Lost capture, data overrun or corrupt audio raises an error, not None.","behavior":"Wait for this sample in new audio and return a matching AudioMatch, or None if the recording window ends without a match. Only audio received after the call starts is searched; recognition is not guaranteed.\nStarts listening if needed, with the same requirements as Audio.start(), and keeps listening until Audio.stop() or macro completion. Processing may finish after timeout_ms. A timeout of 0 returns None without starting capture.\nMacro Pause discards pending audio and pauses the timeout; Resume searches new audio. Lost capture, data overrun or corrupt audio raises an error, not None.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"timeout_ms","type":"Number (0..2147483647)","defaultValue":null,"description":"Required whole duration from 0 to 2147483647 milliseconds. Macro pause time is excluded. The recording window is approximate; processing can finish later.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number (0..1)","defaultValue":null,"description":"Required finite number from 0 to 1. Calibrate with independent recordings; 0.85 is an example, not a recommended universal threshold.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"AudioMatch | None","returnDescription":null,"example":"# Wait for a new sound and handle timeout\naudio = Audio(\"alert\")\nresult = audio.find(timeout_ms=5000, threshold=0.85)\nif result is not None:\n    print(result.score, result.start_ms, result.end_ms)\nAudio.stop()","aliases":[],"group":"FLOW"},{"key":"class-audiomatch","kind":"READ_ONLY_CLASS","parentKey":null,"name":"AudioMatch","signature":"AudioMatch","description":"Read-only audio match result. Score is similarity, not an accuracy probability. find() timestamps use the listening session timeline; match() uses the searched audio value's timeline. Compare timestamps to avoid handling one sound repeatedly. Only use timestamps as detections when matched is True.","behavior":"Read-only audio match result. Score is similarity, not an accuracy probability. find() timestamps use the listening session timeline; match() uses the searched audio value's timeline. Compare timestamps to avoid handling one sound repeatedly. Only use timestamps as detections when matched is True.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":["matched","score","start_ms","end_ms"],"fieldDocs":[{"name":"matched","type":"Boolean","defaultValue":null,"description":"True when a non-silent candidate meets the threshold.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"score","type":"Number","defaultValue":null,"description":"Similarity from 0 to 1, not a probability.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"start_ms","type":"Number","defaultValue":null,"description":"Candidate start time in milliseconds on the searched audio timeline.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"end_ms","type":"Number","defaultValue":null,"description":"Exclusive end time in milliseconds on the same timeline as start_ms.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Save the alert sample in Template Manager before running\nsample = Audio(\"alert\")\nAudio.start()\nwait(1500)\nclip = Audio.recent(1500)\nresult = clip.match(sample, 0.85)\nprint(result.matched, result.score, result.start_ms, result.end_ms)\nAudio.stop()","aliases":[],"group":null},{"key":"class-point","kind":"CLASS","parentKey":null,"name":"Point","signature":"Point(x, y, /, scale=\"fixed\", anchor=\"none\")","description":"A screen position in pixels, used for clicks, swipes and highlights. Scale and anchor adapt the position to another screen size; the final position is kept within the screen. Read both coordinates with x, y = point.","behavior":"A screen position in pixels, used for clicks, swipes and highlights. Scale and anchor adapt the position to another screen size; the final position is kept within the screen. Read both coordinates with x, y = point.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["x","y","scale","anchor"],"fieldDocs":[{"name":"x","type":"Number","defaultValue":null,"description":"Horizontal coordinate in pixels.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"y","type":"Number","defaultValue":null,"description":"Vertical coordinate in pixels.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"scale","type":"String","defaultValue":"fixed","description":"How coordinates adapt from the macro screen: fixed keeps pixels; auto scales X by width and Y by height; width or height scales both axes by that dimension. Non-fixed coordinates or an anchor also follow macro screen rotation and app area mapping.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position for adapting coordinates: none (top-left), center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right. auto chooses the nearest edge or center.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"x","type":"Number","defaultValue":null,"description":"X coordinate in pixels","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"y","type":"Number","defaultValue":null,"description":"Y coordinate in pixels","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"scale","type":"String","defaultValue":"fixed","description":"How coordinates adapt from the macro screen: fixed keeps pixels; auto scales X by width and Y by height; width or height scales both axes by that dimension. Non-fixed coordinates or an anchor also follow macro screen rotation and app area mapping.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position for adapting coordinates: none (top-left), center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right. auto chooses the nearest edge or center.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":"# Read the x, y values of Point\np = Point(500, 900)\nx_value = p.x #500\ny_value = p.y #900\nscale_value = p.scale #FIXED_PIXEL\n\n# Unpack Point into x, y coordinates\nx, y = p","constructorExample":"# Create a Point with scale/anchor and click that position\np = Point(500, 900, scale=\"width\", anchor=\"center\")\nclick(p)","params":[],"returnType":null,"returnDescription":null,"example":"origin = Point(0, 0)\ntarget = Point(500, 900)\nswipe([\n    SwipePoint(origin, speed=\"NORMAL\"),\n    SwipePoint(target)\n])","aliases":[],"group":null},{"key":"class-point-method-offset","kind":"METHOD","parentKey":"class-point","name":"offset","signature":"point.offset(dx, dy, scale=None)","description":"Return a new Point shifted by dx and dy after adapting this point to the current screen. Scale the shift using full-screen dimensions, keeping X horizontal and Y vertical. The original Point is unchanged.","behavior":"Return a new Point shifted by dx and dy after adapting this point to the current screen. Scale the shift using full-screen dimensions, keeping X horizontal and Y vertical. The original Point is unchanged.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dx","type":"Int","defaultValue":null,"description":"Horizontal shift in whole pixels: positive moves right, negative moves left. Fractions are rejected.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"dy","type":"Int","defaultValue":null,"description":"Vertical shift in whole pixels: positive moves down, negative moves up. Fractions are rejected.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"scale","type":"String?","defaultValue":"None","description":"Offset scale mode using full-screen dimensions. Defaults to this Point's current scale. Values: fixed, auto, width, height.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Point","returnDescription":"A new Point within the current screen, with scale FIXED_PIXEL and anchor NONE.","example":"# Scale the pixel delta by full-screen width, then add it to Point\ntarget = Point(500, 900, scale=\"width\", anchor=\"center\").offset(120, -80)\nprint(target)\ntarget.highlight()","aliases":[],"group":"FLOW"},{"key":"class-point-method-highlight","kind":"METHOD","parentKey":"class-point","name":"highlight","signature":"point.highlight(color=\"green\", line_width=2, region_width=36, auto_hide_ms=0)","description":"Mark this point with a square outline. Calling again on the same Point replaces its outline. Returns before drawing finishes; only the latest update before the next screen refresh is shown.","behavior":"Mark this point with a square outline. Calling again on the same Point replaces its outline. Returns before drawing finishes; only the latest update before the next screen refresh is shown.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline thickness in dp; values below 1 become 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"region_width","type":"Number","defaultValue":"36","description":"Square width and height in pixels; values below 1 become 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide after N milliseconds. 0 disables auto-hide.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"The highlighted square region centered around the point.","example":"p = Point(500, 900)\np.highlight()","aliases":[],"group":"FLOW"},{"key":"class-point-method-highlight-off","kind":"METHOD","parentKey":"class-point","name":"highlight_off","signature":"point.highlight_off()","description":"Remove the outline created by this Point.","behavior":"Remove the outline created by this Point.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Point","returnDescription":"Returns the same point after turning highlight off.","example":"p = Point(500, 900)\np.highlight(\"red\", 3)\nwait(1000)\np.highlight_off()","aliases":[],"group":"FLOW"},{"key":"class-swipepoint","kind":"CLASS","parentKey":null,"name":"SwipePoint","signature":"SwipePoint(point, speed=\"NORMAL\", delay_before=0, random=10, humanized=False, scale=\"fixed\", anchor=\"none\")","description":"A position and movement settings for one step of a swipe. Pass a list of at least two SwipePoint objects to swipe([...]) to move one finger through those positions.","behavior":"A position and movement settings for one step of a swipe. Pass a list of at least two SwipePoint objects to swipe([...]) to move one finger through those positions.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["point","speed","delay_before","random","humanized","scale","anchor"],"fieldDocs":[{"name":"point","type":"Point","defaultValue":null,"description":"The swipe position in pixels, including its scale and anchor settings.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"speed","type":"String","defaultValue":"NORMAL","description":"Movement speed from this point to the next: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay in milliseconds; negative values become 0. With parallel=False, wait before starting at the first point or after reaching a later point. Parallel swipes use only the first point's delay.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"random","type":"Number","defaultValue":"10","description":"Maximum random displacement in pixels on each axis; 0 uses the exact position. Negative values become 0.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"humanized","type":"Boolean","defaultValue":"False","description":"Use a curved path for the whole swipe if any SwipePoint has humanized=True.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scaling as on Point: fixed, auto, width, height. Inherits from point unless supplied.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position as on Point. Inherits from point unless supplied; a tuple starts with none.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"point","type":"Point | tuple[Number, Number]","defaultValue":null,"description":"A Point or (x, y) tuple in pixels. Keeps the Point's scale and anchor unless explicitly overridden here.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"speed","type":"String","defaultValue":"NORMAL","description":"Movement speed from this point to the next: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay in milliseconds; negative values become 0. With parallel=False, wait before starting at the first point or after reaching a later point. Parallel swipes use only the first point's delay.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"random","type":"Number","defaultValue":"10","description":"Maximum random displacement in pixels on each axis; 0 uses the exact position. Negative values become 0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"humanized","type":"Boolean","defaultValue":"False","description":"Use a curved path for the whole swipe if any SwipePoint has humanized=True.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scaling as on Point: fixed, auto, width, height. Inherits from point unless supplied.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position as on Point. Inherits from point unless supplied; a tuple starts with none.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":"path = [\n    SwipePoint(Point(500, 1500), speed=\"FAST\"),\n    SwipePoint((560, 980), speed=\"NORMAL\", humanized=True),\n    SwipePoint(Point(500, 500))\n]\nswipe(path)","params":[],"returnType":null,"returnDescription":null,"example":"# Two parallel fingers, each finger is one flat path\nTouch.collect()\nleft = swipe([\n    SwipePoint(Point(300, 1500), speed=\"FAST\"),\n    SwipePoint(Point(300, 500))\n], parallel=True)\nright = swipe([\n    SwipePoint(Point(780, 1500), speed=\"FAST\"),\n    SwipePoint(Point(780, 500))\n], parallel=True)\nTouch.send()\nTouch.wait()","aliases":[],"group":null},{"key":"class-touch","kind":"CLASS","parentKey":null,"name":"Touch","signature":"Touch","description":"Manage parallel clicks and swipes from scripts or macro actions: group them, inspect their progress, wait or cancel. In scripts, use click(..., parallel=True) or swipe(..., parallel=True). Sending gestures requires CogniTab's Accessibility service to be enabled.","behavior":"Manage parallel clicks and swipes from scripts or macro actions: group them, inspect their progress, wait or cancel. In scripts, use click(..., parallel=True) or swipe(..., parallel=True). Sending gestures requires CogniTab's Accessibility service to be enabled.","execution":{"blocking":"conditional","threadSafety":"limited","parallel":"conditional","details":"parallel=True queues touches; delay_before, delay_after still wait outside collect mode. Touch.collect() gathers, send() sends, and wait() waits for completion. Different flows’ touches can interfere."},"limitations":[],"relatedApis":["class-touch-static-method-collect","class-touch-static-method-send","class-touch-static-method-wait"],"isCallable":false,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"Touch.collect()\na = click(Point(300, 900), hold_ms=5000, parallel=True)\nb = click(Point(780, 900), hold_ms=1000, delay_before=1000, parallel=True)\nsent = Touch.send()\nTouch.cancel(a)\nTouch.wait()","aliases":[],"group":null},{"key":"class-touch-static-method-collect","kind":"STATIC_METHOD","parentKey":"class-touch","name":"collect","signature":"Touch.collect()","description":"Hold subsequent script clicks/swipes with parallel=True until Touch.send(), so they can run together. Other calls are unaffected. Without collection, parallel calls are submitted immediately. Call Touch.send() before the script ends or unsent gestures cause an error.","behavior":"Hold subsequent script clicks/swipes with parallel=True until Touch.send(), so they can run together. Other calls are unaffected. Without collection, parallel calls are submitted immediately. Call Touch.send() before the script ends or unsent gestures cause an error.","execution":{"blocking":"no","threadSafety":"limited","parallel":"conditional","details":"Returns before gestures finish. Collected touches run only after Touch.send(). Status describes the moment checked and can change immediately afterward."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-send","kind":"STATIC_METHOD","parentKey":"class-touch","name":"send","signature":"Touch.send()","description":"Submit the collected gestures together and end collection. Returns their numeric IDs in collection order, or an empty list if none were collected. More than 10 gestures raises an error. Submission does not wait for completion; use Touch.wait().","behavior":"Submit the collected gestures together and end collection. Returns their numeric IDs in collection order, or an empty list if none were collected. More than 10 gestures raises an error. Submission does not wait for completion; use Touch.wait().","execution":{"blocking":"no","threadSafety":"limited","parallel":"conditional","details":"Returns before gestures finish. Collected touches run only after Touch.send(). Status describes the moment checked and can change immediately afterward."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[Number]","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-queued","kind":"STATIC_METHOD","parentKey":"class-touch","name":"queued","signature":"Touch.queued()","description":"Return states of submitted gestures waiting to start. Gestures held by Touch.collect() are not included until Touch.send().","behavior":"Return states of submitted gestures waiting to start. Gestures held by Touch.collect() are not included until Touch.send().","execution":{"blocking":"no","threadSafety":"limited","parallel":"conditional","details":"Returns before gestures finish. Collected touches run only after Touch.send(). Status describes the moment checked and can change immediately afterward."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nprint(Touch.queued())\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-active","kind":"STATIC_METHOD","parentKey":"class-touch","name":"active","signature":"Touch.active()","description":"Return states of gestures currently running.","behavior":"Return states of gestures currently running.","execution":{"blocking":"no","threadSafety":"limited","parallel":"conditional","details":"Returns before gestures finish. Collected touches run only after Touch.send(). Status describes the moment checked and can change immediately afterward."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nprint(Touch.active())\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-all","kind":"STATIC_METHOD","parentKey":"class-touch","name":"all","signature":"Touch.all()","description":"Return queued and active gesture states plus up to 64 recently finished states. Gestures not yet sent by Touch.send() are excluded.","behavior":"Return queued and active gesture states plus up to 64 recently finished states. Gestures not yet sent by Touch.send() are excluded.","execution":{"blocking":"no","threadSafety":"limited","parallel":"conditional","details":"Returns before gestures finish. Collected touches run only after Touch.send(). Status describes the moment checked and can change immediately afterward."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nprint(Touch.all())\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-wait","kind":"STATIC_METHOD","parentKey":"class-touch","name":"wait","signature":"Touch.wait(id=None)","description":"Wait for the submitted gesture with this numeric ID and return its TouchState, or None if the ID is unknown or no longer retained. With id=None, wait for all queued/active gestures and return the retained states, including recent finished gestures. Send collected gestures first.","behavior":"Wait for the submitted gesture with this numeric ID and return its TouchState, or None if the ID is unknown or no longer retained. With id=None, wait for all queued/active gestures and return the retained states, including recent finished gestures. Send collected gestures first.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for the duration or touch completion. Other flows can continue; pause and stop still apply."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"TouchState | list[TouchState] | None","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\nTouch.wait(first)\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-cancel","kind":"STATIC_METHOD","parentKey":"class-touch","name":"cancel","signature":"Touch.cancel(id=None)","description":"Cancel a submitted queued/active gesture by numeric ID; return True if accepted, otherwise False. With id=None, cancel all queued/active gestures and return the accepted count. Cancelling an active gesture requires Android 8.0+ and raises an error on Android 7.x. Does not cancel gestures still held by Touch.collect().","behavior":"Cancel a submitted queued/active gesture by numeric ID; return True if accepted, otherwise False. With id=None, cancel all queued/active gestures and return the accepted count. Cancelling an active gesture requires Android 8.0+ and raises an error on Android 7.x. Does not cancel gestures still held by Touch.collect().","execution":{"blocking":"conditional","threadSafety":"limited","parallel":"conditional","details":"parallel=True queues touches; delay_before, delay_after still wait outside collect mode. Touch.collect() gathers, send() sends, and wait() waits for completion. Different flows’ touches can interfere."},"limitations":[],"relatedApis":["class-touch-static-method-collect","class-touch-static-method-send","class-touch-static-method-wait"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean | Int","returnDescription":null,"example":"# Inspect or control collected touches\nTouch.collect()\nfirst = click((300, 900), hold_ms=1000, parallel=True)\nsecond = click((780, 900), delay_before=300, parallel=True)\nTouch.send()\n# Active cancellation requires Android 8 or newer\nTouch.cancel(second)\nTouch.wait()","aliases":[],"group":"FLOW"},{"key":"class-touchstate","kind":"READ_ONLY_CLASS","parentKey":null,"name":"TouchState","signature":"TouchState(id, status, kind, action_order, remaining_repeats, completed_repeats)","description":"The state of a parallel click or swipe when it was queried. Obtain it from Touch methods; it does not update automatically.","behavior":"The state of a parallel click or swipe when it was queried. Obtain it from Touch methods; it does not update automatically.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":["id","status","kind","action_order","remaining_repeats","completed_repeats"],"fieldDocs":[{"name":"id","type":"Number","defaultValue":null,"description":"Touch submission id.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"status","type":"String","defaultValue":null,"description":"queued: waiting; active: running; completed: finished successfully; cancelled: cancelled; failed: could not finish.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"kind","type":"String","defaultValue":null,"description":"Touch kind such as click or swipe.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"action_order","type":"Number","defaultValue":null,"description":"Order of the macro action that submitted this gesture.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"remaining_repeats","type":"Number","defaultValue":"0","description":"Repetitions not yet completed.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"completed_repeats","type":"Number","defaultValue":"0","description":"Repetitions already completed.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# TouchState values come from a touch-state query; do not construct them\nTouch.collect()\nclick((300, 900), hold_ms=1000, parallel=True)\nTouch.send()\nfor state in Touch.all():\n    print(state.id, state.status, state.kind)\nTouch.wait()","aliases":[],"group":null},{"key":"class-scaleparam","kind":"CLASS","parentKey":null,"name":"ScaleParam","signature":"ScaleParam(grayscale=True, auto_scale=False, cache_scale=True, template_scale=\"SHORT_EDGE\", fast_matching=False)","description":"Settings for finding template images inside a Region. Pass this object as the Region's scale_param; these settings do not change the region's coordinates.","behavior":"Settings for finding template images inside a Region. Pass this object as the Region's scale_param; these settings do not change the region's coordinates.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["grayscale","auto_scale","cache_scale","template_scale","fast_matching"],"fieldDocs":[{"name":"grayscale","type":"Boolean","defaultValue":"True","description":"**Applies to templates**. Convert screenshot/template to grayscale before template matching.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"auto_scale","type":"Boolean","defaultValue":"False","description":"Try nearby template sizes after applying template_scale. The range adapts to screen size/density and may extend from 0.70x to 1.30x. Has no effect with template_scale=\"NONE\".","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"cache_scale","type":"Boolean","defaultValue":"True","description":"Remember a successful auto_scale size for later searches with the same settings. Applies only when auto_scale=True.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"template_scale","type":"String","defaultValue":"SHORT_EDGE","description":"How to resize the template for this device: SHORT_EDGE uses the shorter screen edge; LONG_EDGE the longer edge; DPI the pixel density; SMALLEST_WIDTH_DP the shorter edge in dp. NONE keeps the image size unchanged.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"fast_matching","type":"Boolean","defaultValue":"False","description":"Downsample both the Region image and template to two thirds before matching. This is faster but may slightly reduce accuracy, especially for small icons.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"grayscale","type":"Boolean","defaultValue":"True","description":"**Applies to templates**. Convert template matching to grayscale.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"auto_scale","type":"Boolean","defaultValue":"False","description":"Try nearby template sizes after applying template_scale. The range adapts to screen size/density and may extend from 0.70x to 1.30x. Has no effect with template_scale=\"NONE\".","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"cache_scale","type":"Boolean","defaultValue":"True","description":"Remember a successful auto_scale size for later searches with the same settings. Applies only when auto_scale=True.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"template_scale","type":"String","defaultValue":"SHORT_EDGE","description":"How to resize the template for this device: SHORT_EDGE uses the shorter screen edge; LONG_EDGE the longer edge; DPI the pixel density; SMALLEST_WIDTH_DP the shorter edge in dp. NONE keeps the image size unchanged.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"fast_matching","type":"Boolean","defaultValue":"False","description":"Downsample both the Region image and template to two thirds before matching. This is faster but may slightly reduce accuracy, especially for small icons.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":"param = ScaleParam(auto_scale=True, template_scale=\"LONG_EDGE\", fast_matching=True)\nparam.cache_scale = False\ntemplate_mode = param.template_scale","constructorExample":"param = ScaleParam(grayscale=True, auto_scale=True, cache_scale=True, template_scale=\"LONG_EDGE\", fast_matching=True)\nquick = ScaleParam(False, True, True, \"LONG_EDGE\", True)","params":[],"returnType":null,"returnDescription":null,"example":"# Configure matching preprocessing on this Region\nsettings = ScaleParam(grayscale=True, fast_matching=True)\nregion = Region(100, 200, 300, 400, scale_param=settings)\nprint(region.find(\"start\", timeout=0).found)","aliases":[],"group":null},{"key":"class-region","kind":"CLASS","parentKey":null,"name":"Region","signature":"Region(x, y, width, height, /, scale=\"fixed\", anchor=\"none\", scale_param=ScaleParam())","description":"A rectangular screen area for finding images or colors, capturing an image, or drawing an outline. Coordinates use pixels on the current horizontal/vertical axes; after scaling and offsets, only the part inside the screen is used. Read its dimensions with x, y, width, height = region.","behavior":"A rectangular screen area for finding images or colors, capturing an image, or drawing an outline. Coordinates use pixels on the current horizontal/vertical axes; after scaling and offsets, only the part inside the screen is used. Read its dimensions with x, y, width, height = region.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["x","y","width","height","scale","anchor","scale_param","middle_point"],"fieldDocs":[{"name":"x","type":"Number","defaultValue":null,"description":"Top-left horizontal coordinate.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"y","type":"Number","defaultValue":null,"description":"Top-left vertical coordinate.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"width","type":"Number","defaultValue":null,"description":"Region width in pixels.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"height","type":"Number","defaultValue":null,"description":"Region height in pixels.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"scale","type":"String","defaultValue":"fixed","description":"How coordinates adapt between full screens: fixed keeps pixels; auto scales X by width and Y by height; width or height scales both axes by that dimension. Uses the macro's source screen size, without rotating axes or using app window size.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position for adapting coordinates: none (top-left), center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right. auto chooses the nearest edge or center.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"scale_param","type":"ScaleParam","defaultValue":"ScaleParam()","description":"**Applies to templates**. Template matching scale parameters used by find/wait methods on this region.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"middle_point","type":"Point","defaultValue":null,"description":"Center point of this region.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"x","type":"Number","defaultValue":null,"description":"Top-left X coordinate","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"y","type":"Number","defaultValue":null,"description":"Top-left Y coordinate","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"width","type":"Number","defaultValue":null,"description":"Region width","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"height","type":"Number","defaultValue":null,"description":"Region height","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"scale","type":"String","defaultValue":"fixed","description":"How coordinates adapt between full screens: fixed keeps pixels; auto scales X by width and Y by height; width or height scales both axes by that dimension. Uses the macro's source screen size, without rotating axes or using app window size.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"anchor","type":"String","defaultValue":"none","description":"Reference position for adapting coordinates: none (top-left), center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right. auto chooses the nearest edge or center.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"scale_param","type":"ScaleParam","defaultValue":"ScaleParam()","description":"**Applies to templates**. Template matching scale parameters.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":"search_area = Region(120, 240, 360, 420)\nleft = search_area.x\ntop = search_area.y\nw = search_area.width\nh = search_area.height\nscale = search_area.scale\nanchor = search_area.anchor\nsearch_area.x = 300\nsearch_area.scale_param = ScaleParam(auto_scale=True, template_scale=\"LONG_EDGE\")\ncenter = search_area.middle_point\n\n# Unpack Region into x, y, width, height\nx, y, width, height = search_area","constructorExample":"search_region = Region(120, 240, 360, 420)\nfixed_center = Region(120, 240, 360, 420, \"fixed\", \"center\")\nleft_lane = Region(120, 240, 360, 420, scale=\"width\", anchor=\"left\", scale_param=ScaleParam(auto_scale=True, template_scale=\"LONG_EDGE\"))","params":[],"returnType":null,"returnDescription":null,"example":"region = Region(100, 200, 300, 400)\nhit = region.find(\"img\", 3000, threshold=0.8, rate=3.0)","aliases":[],"group":null},{"key":"class-region-static-method-highlighted","kind":"STATIC_METHOD","parentKey":"class-region","name":"highlighted","signature":"Region.highlighted()","description":"Return the screen areas currently outlined by scripts, including square outlines created by Point.highlight().","behavior":"Return the screen areas currently outlined by scripts, including square outlines created by Point.highlight().","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[Region]","returnDescription":"list of active highlighted regions.","example":"active_regions = Region.highlighted()\nfor area in active_regions:\n    area.highlight(\"yellow\", auto_hide_ms=500)","aliases":[],"group":"FLOW"},{"key":"class-region-static-method-full-screen","kind":"STATIC_METHOD","parentKey":"class-region","name":"full_screen","signature":"Region.full_screen()","description":"Return the full current screen region.","behavior":"Return the full current screen region.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Region","returnDescription":"A Region covering the current screen from (0, 0).","example":"scan = Region.full_screen()\nhit = scan.find(\"ok\", 2000)","aliases":[],"group":"FLOW"},{"key":"class-region-static-method-highlight-off","kind":"STATIC_METHOD","parentKey":"class-region","name":"highlight_off","signature":"Region.highlight_off()","description":"Turn off all active region highlights.","behavior":"Turn off all active region highlights.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No value.","example":"scan = Region(120, 260, 280, 160)\nscan.highlight(\"green\")\nwait(1000)\nRegion.highlight_off()","aliases":[],"group":"FLOW"},{"key":"class-region-static-method-macro-width","kind":"STATIC_METHOD","parentKey":"class-region","name":"macro_width","signature":"Region.macro_width()","description":"Return the screen width of the device that created this macro, adapted to current screen orientation, when available.","behavior":"Return the screen width of the device that created this macro, adapted to current screen orientation, when available.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number?","returnDescription":"Macro source screen width, or None when unavailable.","example":"macro_w = Region.macro_width()","aliases":[],"group":"FLOW"},{"key":"class-region-static-method-macro-height","kind":"STATIC_METHOD","parentKey":"class-region","name":"macro_height","signature":"Region.macro_height()","description":"Return the screen height of the device that created this macro, adapted to current screen orientation, when available.","behavior":"Return the screen height of the device that created this macro, adapted to current screen orientation, when available.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number?","returnDescription":"Macro source screen height, or None when unavailable.","example":"macro_h = Region.macro_height()","aliases":[],"group":"FLOW"},{"key":"class-region-method-find","kind":"METHOD","parentKey":"class-region","name":"find","signature":"region.find(template, timeout=0, threshold=0.7, rate=3.0)","description":"Find one occurrence of the template in this region. Retry until found or timeout; timeout=0 scans once. Screen capture must be ready. ScreenCapture.cache_on() makes searches reuse one captured image until cache_off(); automatic reuse otherwise lasts up to 100 ms. Use auto_cache_off() for the newest available image, at the cost of more capture work.","behavior":"Find one occurrence of the template in this region. Retry until found or timeout; timeout=0 scans once. Screen capture must be ready. ScreenCapture.cache_on() makes searches reuse one captured image until cache_off(); automatic reuse otherwise lasts up to 100 ms. Use auto_cache_off() for the newest available image, at the cost of more capture work.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name or relative folder path without image extension in the current macro, or a Template object. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"A Match with found=True when found; otherwise found=False after the scan or timeout. Never None.","example":"region = Region(80, 220, 420, 520)\nhit = region.find(\"ok\", 4000, 0.8, 4.0)\nMacroPanel.notify(str(hit))","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-multi","kind":"METHOD","parentKey":"class-region","name":"find_multi","signature":"region.find_multi(template, timeout=0, threshold=0.7, rate=3.0)","description":"Scan inside this region and return all matches for one template when at least one is found. If timeout is omitted, only one scan pass is performed.","behavior":"Scan inside this region and return all matches for one template when at least one is found. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name or relative folder path without image extension in the current macro, or a Template object. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"All matches for the template, or empty list on timeout.","example":"region = Region(80, 220, 420, 520)\nmatches = region.find_multi(\"enemy\", 3000)\nMacroPanel.notify(str(matches))","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-any","kind":"METHOD","parentKey":"class-region","name":"find_any","signature":"region.find_any(templates, timeout=0, threshold=0.7, rate=3.0)","description":"Scan this region and return when any template in the list is found. If timeout is omitted, only one scan pass is performed.","behavior":"Scan this region and return when any template in the list is found. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names/relative folder paths without image extensions, or Template objects. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"One Match per input template, in input order, when any is found; some may have found=False. An empty MatchList if none is found before timeout.","example":"region = Region(80, 220, 420, 520)\nmatches = region.find_any([\"enemy_a\", \"enemy_b\"], 2500)\nMacroPanel.notify(str(matches))","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-all","kind":"METHOD","parentKey":"class-region","name":"find_all","signature":"region.find_all(templates, timeout=0, threshold=0.7, rate=3.0)","description":"Scan this region and return only when every template in the list is found. If timeout is omitted, only one scan pass is performed.","behavior":"Scan this region and return only when every template in the list is found. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names/relative folder paths without image extensions, or Template objects. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"One successful Match per input template in input order, or an empty MatchList if a scan does not find them all before timeout.","example":"region = Region(80, 220, 420, 520)\nmatches = region.find_all([\"hp\", \"mp\"], 5000)\nMacroPanel.notify(str(matches))","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-color","kind":"METHOD","parentKey":"class-region","name":"find_color","signature":"region.find_color(color, timeout=0, tolerance=0, rate=3, interval=10)","description":"Find one sampled pixel closest to the target color in this region. Each red, green and blue channel must differ by no more than tolerance; the smallest largest-channel difference wins. Retry until found or timeout; timeout=0 scans once. Requires ready screen capture.","behavior":"Find one sampled pixel closest to the target color in this region. Each red, green and blue channel must differ by no more than tolerance; the smallest largest-channel difference wins. Retry until found or timeout; timeout=0 scans once. Requires ready screen capture.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":null,"description":"Target color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"interval","type":"Number","defaultValue":"10","description":"Requested distance in pixels between tested positions; at least 1. Smaller values inspect more pixels and may take longer. The distance may increase automatically for large areas.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"A Match with at most one Point in point, or found=False and an empty point list if no sampled pixel matches or capture is unavailable.","example":"scan = Region(80, 220, 420, 520)\nhit = scan.find_color(\"#FF4CAF50\", tolerance=8, interval=4)\nif hit.found:\n    click(hit.point[0], random=0)","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-any-color","kind":"METHOD","parentKey":"class-region","name":"find_any_color","signature":"region.find_any_color(colors, timeout=0, tolerance=0, rate=3, interval=10)","description":"Find any of the target colors in this region using the RGB tolerance rule of find_color. Return at most one best sampled point per found color, in input order. Retry until any color is found or timeout; timeout=0 scans once. Requires ready screen capture.","behavior":"Find any of the target colors in this region using the RGB tolerance rule of find_color. Return at most one best sampled point per found color, in input order. Retry until any color is found or timeout; timeout=0 scans once. Requires ready screen capture.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"colors","type":"list[Color | String | Number] | tuple[Color | String | Number]","defaultValue":null,"description":"Target colors.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"interval","type":"Number","defaultValue":"10","description":"Requested distance in pixels between tested positions; at least 1. Smaller values inspect more pixels and may take longer. The distance may increase automatically for large areas.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"A Match with one best Point per found color in point, in input order. found=False and an empty point list if none matches or capture is unavailable.","example":"colors = [\"#FF0000\", \"#00FF00\", \"#0000FF\"]\nhit = Region.full_screen().find_any_color(colors, tolerance=6)\nif hit.found:\n    click(hit, random=0)","aliases":[],"group":"FLOW"},{"key":"class-region-method-find-multi-color","kind":"METHOD","parentKey":"class-region","name":"find_multi_color","signature":"region.find_multi_color(color, timeout=0, tolerance=0, rate=3, interval=10)","description":"Find all sampled pixels matching one target color using the RGB tolerance rule of find_color. A list or tuple of colors raises an error. Retry until at least one point is found or timeout; timeout=0 scans once. Requires ready screen capture.","behavior":"Find all sampled pixels matching one target color using the RGB tolerance rule of find_color. A list or tuple of colors raises an error. Retry until at least one point is found or timeout; timeout=0 scans once. Requires ready screen capture.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":null,"description":"Single target color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"interval","type":"Number","defaultValue":"10","description":"Requested distance in pixels between tested positions; at least 1. Smaller values inspect more pixels and may take longer. The distance may increase automatically for large areas.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"A Match with matching sampled Points in point, closest color first. found=False and an empty point list if none matches or capture is unavailable.","example":"hit = Region(80, 220, 420, 520).find_multi_color(\"red\", tolerance=4, interval=3)\nif hit.found:\n    first = hit.point[0]\n    hit.highlight(color=\"yellow\", auto_hide_ms=800)","aliases":[],"group":"FLOW"},{"key":"class-region-method-wait","kind":"METHOD","parentKey":"class-region","name":"wait","signature":"region.wait(template, timeout=0, threshold=0.7, rate=3.0)","description":"Wait until the template disappears from this region. If timeout is omitted, only one scan pass is performed.","behavior":"Wait until the template disappears from this region. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name or relative folder path without image extension in the current macro, or a Template object. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"The latest Match: found=False means the image is absent; found=True means it was still present when waiting ended. Never None. Requires ready screen capture; unavailable capture can also report found=False.","example":"region = Region(0, 0, 1080, 2400)\nresult = region.wait(\"loading\", 8000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-method-wait-any","kind":"METHOD","parentKey":"class-region","name":"wait_any","signature":"region.wait_any(templates, timeout=0, threshold=0.7, rate=3.0)","description":"Wait until any template in the list disappears from this region. If timeout is omitted, only one scan pass is performed.","behavior":"Wait until any template in the list disappears from this region. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names/relative folder paths without image extensions, or Template objects. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"The latest Match for each input template, in input order, on disappearance or timeout. Check each found value; False means that image is absent. Requires ready screen capture; unavailable capture can also report found=False.","example":"watch = [\"loading\", \"syncing\"]\nresult = region.wait_any(watch, 10000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-method-wait-all","kind":"METHOD","parentKey":"class-region","name":"wait_all","signature":"region.wait_all(templates, timeout=0, threshold=0.7, rate=3.0)","description":"Wait until all templates in the list disappear from this region. If timeout is omitted, only one scan pass is performed.","behavior":"Wait until all templates in the list disappear from this region. If timeout is omitted, only one scan pass is performed.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names/relative folder paths without image extensions, or Template objects. Unknown names raise an error.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait in milliseconds. Omitted, zero or negative values scan once. A scan already running may finish after this time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Requested scans per second while waiting, limited to 1-60. Actual speed depends on recognition time.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"The latest Match for each input template, in input order, on disappearance or timeout. All found values are False only when every image is absent. Requires ready screen capture; unavailable capture can also report found=False.","example":"watch = [\"loading\", \"syncing\"]\nresult = region.wait_all(watch, 10000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-method-capture","kind":"METHOD","parentKey":"class-region","name":"capture","signature":"region.capture(name=None)","description":"Capture this screen area as a Template. Requires an active screen capture session with user consent. Unavailable capture or a region entirely outside the screen raises an error.","behavior":"Capture this screen area as a Template. Requires an active screen capture session with user consent. Unavailable capture or a region entirely outside the screen raises an error.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for shared screen capture and recognition. find* searches for appearance; wait* waits for disappearance. Even one check takes time; timeout/rate does not remove this wait."},"limitations":[],"relatedApis":["class-screencapture","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String?","defaultValue":"None","description":"A name saves the image into the current macro immediately; None creates a temporary image. Saving a named image is not allowed in a protected macro.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Template","returnDescription":"A Template containing the captured image.","example":"sample = Region(120, 280, 220, 120).capture()\nsaved = sample.save_as(\"buttons/top/enemy_slot\")","aliases":[],"group":"FLOW"},{"key":"class-region-method-left","kind":"METHOD","parentKey":"class-region","name":"left","signature":"region.left(value=0.5)","description":"Shrink this region toward the left side. The right edge moves left by the requested amount.","behavior":"Shrink this region toward the left side. The right edge moves left by the requested amount.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Width to remove: 0-1 is a fraction of the current width; above 1 is pixels, capped at the full width. Negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A new region narrowed from the right edge.","example":"full = Region(100, 200, 1000, 500)\nleft_focus = full.left(0.4)\nleft_focus_px = full.left(400)","aliases":[],"group":"FLOW"},{"key":"class-region-method-right","kind":"METHOD","parentKey":"class-region","name":"right","signature":"region.right(value=0.5)","description":"Shrink this region toward the right side. The left edge moves right by the requested amount.","behavior":"Shrink this region toward the right side. The left edge moves right by the requested amount.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Width to remove: 0-1 is a fraction of the current width; above 1 is pixels, capped at the full width. Negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A new region narrowed from the left edge.","example":"full = Region(100, 200, 1000, 500)\nright_focus = full.right(0.3)\nright_focus_px = full.right(240)","aliases":[],"group":"FLOW"},{"key":"class-region-method-top","kind":"METHOD","parentKey":"class-region","name":"top","signature":"region.top(value=0.5)","description":"Shrink this region toward the top side. The bottom edge moves upward by the requested amount.","behavior":"Shrink this region toward the top side. The bottom edge moves upward by the requested amount.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Height to remove: 0-1 is a fraction of the current height; above 1 is pixels, capped at the full height. Negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A new region narrowed from the bottom edge.","example":"full = Region(100, 200, 1000, 500)\ntop_focus = full.top(0.25)\ntop_focus_px = full.top(120)","aliases":[],"group":"FLOW"},{"key":"class-region-method-bottom","kind":"METHOD","parentKey":"class-region","name":"bottom","signature":"region.bottom(value=0.5)","description":"Shrink this region toward the bottom side. The top edge moves downward by the requested amount.","behavior":"Shrink this region toward the bottom side. The top edge moves downward by the requested amount.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Height to remove: 0-1 is a fraction of the current height; above 1 is pixels, capped at the full height. Negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A new region narrowed from the top edge.","example":"full = Region(100, 200, 1000, 500)\nbottom_focus = full.bottom(0.25)\nbottom_focus_px = full.bottom(120)","aliases":[],"group":"FLOW"},{"key":"class-region-method-horizontal","kind":"METHOD","parentKey":"class-region","name":"horizontal","signature":"region.horizontal(value=0.5)","description":"Shrink horizontally toward the center by moving both left and right edges inward.","behavior":"Shrink horizontally toward the center by moving both left and right edges inward.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total width to remove, split equally between both sides: 0-1 is a fraction, above 1 is pixels. Capped at the full width; negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A centered region with reduced width.","example":"full = Region(100, 200, 1000, 500)\ncenter_lane = full.horizontal(0.5)\ncenter_lane_px = full.horizontal(300)","aliases":[],"group":"FLOW"},{"key":"class-region-method-vertical","kind":"METHOD","parentKey":"class-region","name":"vertical","signature":"region.vertical(value=0.5)","description":"Shrink vertically toward the center by moving both top and bottom edges inward.","behavior":"Shrink vertically toward the center by moving both top and bottom edges inward.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total height to remove, split equally between both sides: 0-1 is a fraction, above 1 is pixels. Capped at the full height; negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A centered region with reduced height.","example":"full = Region(100, 200, 1000, 500)\ncenter_band = full.vertical(0.5)\ncenter_band_px = full.vertical(200)","aliases":[],"group":"FLOW"},{"key":"class-region-method-middle","kind":"METHOD","parentKey":"class-region","name":"middle","signature":"region.middle(value=0.5)","description":"Shrink both width and height toward the center.","behavior":"Shrink both width and height toward the center.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Creates or calculates a screen area without capture or recognition. Keep changeable Region objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Amount removed from each dimension: 0-1 is a fraction of that dimension; above 1 is pixels. Split equally between opposite edges, capped at each dimension. Negative values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"A centered region reduced on both axes.","example":"full = Region(100, 200, 1000, 500)\nfocus = full.middle(0.4)\nfocus_px = full.middle(160)","aliases":[],"group":"FLOW"},{"key":"class-region-method-highlight","kind":"METHOD","parentKey":"class-region","name":"highlight","signature":"region.highlight(color=\"green\", line_width=2, auto_hide_ms=0, movable=False)","description":"Draw a rectangular outline around this region. Calling again on the same Region replaces its outline. Returns before drawing finishes; only the latest update before the next screen refresh is shown.","behavior":"Draw a rectangular outline around this region. Calling again on the same Region replaces its outline. Returns before drawing finishes; only the latest update before the next screen refresh is shown.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline thickness in dp; values below 1 become 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide after N milliseconds. 0 disables auto-hide.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"movable","type":"Boolean","defaultValue":"False","description":"Allow dragging the highlighted region and write the moved coordinates back into this Region.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Region","returnDescription":"Returns the same region after drawing highlight.","example":"scan = Region(120, 260, 280, 160)\nscan.highlight(\"#FF00BCD4\", line_width=3, auto_hide_ms=1500, movable=True)","aliases":[],"group":"FLOW"},{"key":"class-region-method-highlight-off","kind":"METHOD","parentKey":"class-region","name":"highlight_off","signature":"region.highlight_off()","description":"Remove the outline created by this Region.","behavior":"Remove the outline created by this Region.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Region","returnDescription":"Returns the same region after turning highlight off.","example":"scan = Region(120, 260, 280, 160)\nscan.highlight(\"green\")\nwait(1000)\nscan.highlight_off()","aliases":[],"group":"FLOW"},{"key":"class-template","kind":"CLASS","parentKey":null,"name":"Template","signature":"Template(name, /)","description":"Use a saved image as a recognition target. You can resize or crop it into a separate Template, then save the result with save_as().","behavior":"Use a saved image as a recognition target. You can resize or crop it into a separate Template, then save the result with save_as().","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["name"],"fieldDocs":[{"name":"name","type":"String?","defaultValue":null,"description":"Template name or relative folder path in the current macro; None for an unnamed image.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"name","type":"String","defaultValue":null,"description":"Saved template in the current macro, for example \"buttons/top/attack\". An empty, missing, or ambiguous name raises an error; this does not capture a new image.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"fieldExample":null,"constructorExample":"base = Template(\"enemy_head\")","params":[],"returnType":null,"returnDescription":null,"example":"base = Template(\"enemy_head\")\nvariant = base.scale(0.9).crop(Region(0, 0, 64, 64)).save_as(\"enemy_head_small\")","aliases":[],"group":null},{"key":"class-template-static-method-exists","kind":"STATIC_METHOD","parentKey":"class-template","name":"exists","signature":"Template.exists(name)","description":"Check whether a template name exists in the current macro.","behavior":"Check whether a template name exists in the current macro.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Template name or relative folder path to check.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true if the template exists.","example":"if Template.exists(\"enemy_head\"):\n    text(\"ready\")","aliases":[],"group":"FLOW"},{"key":"class-template-method-similarity","kind":"METHOD","parentKey":"class-template","name":"similarity","signature":"template.similarity(other)","description":"Compare the overall light and dark pattern of two images. Unreadable images or different image dimensions raise an error. The comparison ignores transparency and may miss color, brightness, or small detail changes; 100 does not mean identical pixels.","behavior":"Compare the overall light and dark pattern of two images. Unreadable images or different image dimensions raise an error. The comparison ignores transparency and may miss color, brightness, or small detail changes; 100 does not mean identical pixels.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"Template","defaultValue":null,"description":"Required template with the same image width and height.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"Similarity from 0 to 100, in steps of 1.5625; higher means a more similar light and dark pattern.","example":"# Compare two saved templates of the same size.\nbefore = Template(\"before\")\nafter = Template(\"after\")\nscore = before.similarity(after)\nprint(score)","aliases":[],"group":"FLOW"},{"key":"class-template-method-exists","kind":"METHOD","parentKey":"class-template","name":"exists","signature":"template.exists()","description":"Check whether this Template's image file still exists. This does not check whether the image is readable.","behavior":"Check whether this Template's image file still exists. This does not check whether the image is readable.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true if the backing template file exists.","example":"t = Template(\"enemy_head\")\nif t.exists():\n    text(\"ok\")","aliases":[],"group":"FLOW"},{"key":"class-template-method-scale","kind":"METHOD","parentKey":"class-template","name":"scale","signature":"template.scale(scale, scale_y=None)","description":"Resize the image and return a separate Template without changing the source. Use save_as() to keep it under a chosen name.","behavior":"Resize the image and return a separate Template without changing the source. Use save_as() to keep it under a chosen name.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"scale","type":"Number","defaultValue":null,"description":"Width multiplier: 1 keeps the width, 0.5 halves it, 2 doubles it. Values below 0.01 use 0.01. Also applies to height when scale_y is omitted.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"scale_y","type":"Number","defaultValue":"scale","description":"Height multiplier, with a minimum of 0.01. Omit it to keep the original proportions.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Template","returnDescription":"Scaled template object.","example":"t = Template(\"enemy_head\")\nsmall = t.scale(0.8)\nhit = Region(0, 0, 1080, 2400).find(small, 3000)","aliases":[],"group":"FLOW"},{"key":"class-template-method-crop","kind":"METHOD","parentKey":"class-template","name":"crop","signature":"template.crop(region)","description":"Cut out part of the image and return a separate Template without changing the source. Use save_as() to keep it under a chosen name.","behavior":"Cut out part of the image and return a separate Template without changing the source. Use save_as() to keep it under a chosen name.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"region","type":"Region","defaultValue":null,"description":"Crop rectangle in image pixels, measured from the image's top-left corner, not the screen. Coordinates are truncated to integers and clipped to the image edges.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Template","returnDescription":"Cropped template object.","example":"t = Template(\"enemy_head\")\nface = t.crop(Region(10, 10, 60, 60))","aliases":[],"group":"FLOW"},{"key":"class-template-method-save-as","kind":"METHOD","parentKey":"class-template","name":"save_as","signature":"template.save_as(name)","description":"Save the image in the current macro and return the saved Template. Protected macros cannot save templates; a missing source file raises an error.","behavior":"Save the image in the current macro and return the saved Template. Protected macros cannot save templates; a missing source file raises an error.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty name or relative folder path, for example \"buttons/top/attack\". An existing image at that path is replaced.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Template","returnDescription":"Saved named template object.","example":"captured = Region(200, 300, 120, 90).capture()\nsaved = captured.save_as(\"buttons/top/enemy_slot\")\nif saved.exists():\n    text(\"saved\")","aliases":[],"group":"FLOW"},{"key":"class-recognition","kind":"READ_ONLY_CLASS","parentKey":null,"name":"Recognition","signature":"Recognition","description":"Used in the recognition success branch in the UI. Recognition.result returns the Match for one recognition target or MatchList when multiple targets matched.","behavior":"Used in the recognition success branch in the UI. Recognition.result returns the Match for one recognition target or MatchList when multiple targets matched.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":["result"],"fieldDocs":[{"name":"result","type":"Match | MatchList","defaultValue":null,"description":"The active recognition result for this Success branch.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":"current = Recognition.result\nif current.found:\n    click(current, random=0)","constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Recognition is only available in Python for the Recognition success branch.\na = Recognition.result\nif a.found:\n    a.highlight(color=\"yellow\", auto_hide_ms=800)","aliases":[],"group":null},{"key":"class-match","kind":"READ_ONLY_CLASS","parentKey":null,"name":"Match","signature":"Match","description":"Read the result of a recognition search. Check found before clicking or using its location; a failed image search can still contain the best candidate's location.","behavior":"Read the result of a recognition search. Check found before clicking or using its location; a failed image search can still contain the best candidate's location.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":["name","found","confidence","conf","point","bounds","region","inference_info"],"fieldDocs":[{"name":"name","type":"String?","defaultValue":null,"description":"Matched target name. Template matches use the template name without extension, OCR uses the matched target text, and color matches use Color.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"found","type":"Boolean","defaultValue":null,"description":"Whether a match was found.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"confidence","type":"Number","defaultValue":null,"description":"Confidence score from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"conf","type":"Number","defaultValue":null,"description":"Alias of confidence; returns the same score from 0.0 to 1.0.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"point","type":"Point? | list[Point]","defaultValue":null,"description":"Result location: a Point, a list of Points, or None. Color searches return a list, possibly empty. Check found and the value's shape before reading coordinates or indexing a list.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"bounds","type":"Region?","defaultValue":null,"description":"Rectangle around the result, or None when unavailable. A failed image search may still provide the best candidate's rectangle; check found first.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"region","type":"Region?","defaultValue":null,"description":"Alias of bounds; returns the same matched Region or None.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"inference_info","type":"dict?","defaultValue":null,"description":"Extra result details, or None. Model results can include class_id, class_name, timing fields ending in _ms (milliseconds), and input_width/input_height (pixels). Color results can include target_color, sampled_color, max_channel_delta, match_count, and matches. Keys vary by search; check that a key exists before reading it.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":"# Read optional details and color points safely.\nm = Region(100, 200, 300, 400).find(\"btn\", 3000)\ntarget_name = m.name\nis_found = m.found\nscore = m.confidence\nshort_score = m.conf\ncenter = m.point\nbox = m.bounds\nsame_box = m.region\ninfo = m.inference_info\nif info is not None:\n    info_class_id = info.get(\"class_id\")\n    info_class_name = info.get(\"class_name\")\n\ncolor_hit = Region(0, 0, 1080, 1920).find_color(\"#FFFFFF\", tolerance=4)\ncolor_name = color_hit.name\nif color_hit.found and color_hit.point:\n    first_color_point = color_hit.point[0]\n\n# In the Recognition success branch:\ncurrent = Recognition.result\nif current.found:\n    text(current.name)\n    current.highlight(color=\"yellow\", auto_hide_ms=800)","constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"m = Region(100, 200, 300, 400).find(\"btn\", 3000)\nif m.found:\n    click(m)\n    conf = m.confidence\n\n# Recognition.result is only available in Python for the Recognition success branch.\nif Recognition.result.found:\n    click(Recognition.result, random=0)","aliases":[],"group":null},{"key":"class-match-method-highlight","kind":"METHOD","parentKey":"class-match","name":"highlight","signature":"match.highlight(color=\"green\", line_width=2, region_width=36, auto_hide_ms=0)","description":"Mark a found result on screen. Draws bounds when available, otherwise a square around each point; does nothing when found=false. Drawing is scheduled, so the call can return before the frame appears. Only the latest update pending for the same instance is drawn at the next display frame.","behavior":"Mark a found result on screen. Draws bounds when available, otherwise a square around each point; does nothing when found=false. Drawing is scheduled, so the call can return before the frame appears. Only the latest update pending for the same instance is drawn at the next display frame.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline width in pixels, with a minimum of 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"region_width","type":"Number","defaultValue":"36","description":"Square width in pixels when only points are available, with a minimum of 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Time before hiding, in milliseconds. 0 or a negative value keeps the highlight visible until highlight_off().","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Match","returnDescription":"The same Match, so you can continue calling its methods.","example":"m = Region(100, 200, 300, 400).find(\"start\", 3000)\nm.highlight(color=\"yellow\", line_width=3, auto_hide_ms=1200)","aliases":[],"group":"FLOW"},{"key":"class-match-method-highlight-off","kind":"METHOD","parentKey":"class-match","name":"highlight_off","signature":"match.highlight_off()","description":"Turn off the active highlight generated from this match instance.","behavior":"Turn off the active highlight generated from this match instance.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Match","returnDescription":"Returns the same match after turning highlight off.","example":"m = Region(100, 200, 300, 400).find(\"start\", 3000)\nm.highlight()\nm.highlight_off()","aliases":[],"group":"FLOW"},{"key":"class-matchlist","kind":"READ_ONLY_CLASS","parentKey":null,"name":"MatchList","signature":"MatchList","description":"Read several recognition results as a list of Match values. Use len(matches), matches[index], or a for loop. A non-empty list can include failed matches, especially after wait_any()/wait_all(); check each item's found value.","behavior":"Read several recognition results as a list of Match values. Use len(matches), matches[index], or a for loop. A non-empty list can include failed matches, especially after wait_any()/wait_all(); check each item's found value.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"hits = Region(100, 200, 300, 400).find_all([\"hp\", \"mp\"], 5000)\nif hits:\n    click(hits, offset=(0, 4), random=0)","aliases":[],"group":null},{"key":"class-matchlist-method-highlight","kind":"METHOD","parentKey":"class-matchlist","name":"highlight","signature":"matches.highlight(color=\"green\", line_width=2, region_width=36, auto_hide_ms=0)","description":"Mark each found result on screen, using its bounds or squares around its points. Skips results without a location. Drawing is scheduled, so the call can return before the frames appear. Only the latest update pending for the same instance is drawn at the next display frame.","behavior":"Mark each found result on screen, using its bounds or squares around its points. Skips results without a location. Drawing is scheduled, so the call can return before the frames appear. Only the latest update pending for the same instance is drawn at the next display frame.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline width in pixels, with a minimum of 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"region_width","type":"Number","defaultValue":"36","description":"Square width in pixels when only points are available, with a minimum of 1.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Time before hiding, in milliseconds. 0 or a negative value keeps the highlight visible until highlight_off().","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"The same MatchList, so you can continue calling its methods.","example":"hits = Region(100, 200, 300, 400).find_any([\"enemy_a\", \"enemy_b\"], 2500)\nhits.highlight(color=\"yellow\", line_width=3, auto_hide_ms=1200)","aliases":[],"group":"FLOW"},{"key":"class-matchlist-method-highlight-off","kind":"METHOD","parentKey":"class-matchlist","name":"highlight_off","signature":"matches.highlight_off()","description":"Turn off all active highlights generated from this match list instance.","behavior":"Turn off all active highlights generated from this match list instance.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"MatchList","returnDescription":"Returns the same match list after turning highlight off.","example":"hits = Region(100, 200, 300, 400).find_any([\"enemy_a\", \"enemy_b\"], 2500)\nhits.highlight()\nhits.highlight_off()","aliases":[],"group":"FLOW"},{"key":"class-color","kind":"CLASS","parentKey":null,"name":"Color","signature":"Color(value, /)","description":"Store a color, sample colors from the screen, or compare colors. ARGB contains opacity (A), red (R), green (G), and blue (B); compare(), distance_rgb(), and delta_e() ignore opacity.","behavior":"Store a color, sample colors from the screen, or compare colors. ARGB contains opacity (A), red (R), green (G), and blue (B); compare(), distance_rgb(), and delta_e() ignore opacity.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["argb","a","r","g","b","hex"],"fieldDocs":[{"name":"argb","type":"Number","defaultValue":null,"description":"Raw ARGB integer value.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"a","type":"Int","defaultValue":null,"description":"Opacity from 0 (transparent) to 255 (opaque).","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"r","type":"Int","defaultValue":null,"description":"Red channel 0-255.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"g","type":"Int","defaultValue":null,"description":"Green channel 0-255.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"b","type":"Int","defaultValue":null,"description":"Blue channel 0-255.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"hex","type":"String","defaultValue":null,"description":"Hex string `#AARRGGBB`.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"value","type":"String | Number","defaultValue":null,"description":"Hex string (`#AARRGGBB`/`#RRGGBB`) or raw ARGB number.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"fieldExample":null,"constructorExample":"c1 = Color(\"#FFFFFFFF\")\nc2 = Color(4294967295)","params":[],"returnType":null,"returnDescription":null,"example":"cursor = Point(540, 920)\npicked = Color.get(cursor)\nif picked == \"#FFFFFFFF\":\n    click(cursor, random=6)","aliases":[],"group":null},{"key":"class-color-static-method-get","kind":"STATIC_METHOD","parentKey":"class-color","name":"get","signature":"Color.get(target, interval=3, default=\"#00000000\")","description":"Sample screen colors once: Point returns one Color, Region returns rows of Colors, and list[Point] returns a Color list in the same order. All points use the same screen image. Missing screen capture or samples return default without retrying; choose a default you can distinguish from the color you need.","behavior":"Sample screen colors once: Point returns one Color, Region returns rows of Colors, and list[Point] returns a Color list in the same order. All points use the same screen image. Missing screen capture or samples return default without retrying; choose a default you can distinguish from the color you need.","execution":{"blocking":"yes","threadSafety":"serialized","parallel":"conditional","details":"Waits for screen capture and color sampling. Capture and image reuse settings are shared by all flows."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"target","type":"Point | Region | list[Point]","defaultValue":null,"description":"Sampling target.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"interval","type":"Number","defaultValue":"3","description":"Spacing between sampled points in a Region's coordinate units; values below 1 use 1. A smaller value returns more colors. Ignored for Point and list[Point].","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"default","type":"Color | String | Number","defaultValue":"#00000000","description":"Fallback color returned when screen capture or pixel sampling is unavailable.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Color | list[list[Color]] | list[Color]","returnDescription":"Colors in the target's shape, with unavailable samples replaced by default. For a Region, read grid[row][column], from top to bottom and left to right. An empty point list returns an empty list.","example":"c = Color.get(Point(100, 200), default=\"#FF000000\")\ngrid = Color.get(Region(120, 240, 90, 60), interval=3, default=\"#00000000\")\nbatch = Color.get([Point(10, 10), Point(20, 20)])","aliases":[],"group":"FLOW"},{"key":"class-color-static-method-compare","kind":"STATIC_METHOD","parentKey":"class-color","name":"compare","signature":"Color.compare(a, b, tolerance=0)","description":"Compare two colors by per-channel RGB tolerance. Match passes only when |R1-R2|, |G1-G2|, and |B1-B2| are all <= tolerance.","behavior":"Compare two colors by per-channel RGB tolerance. Match passes only when |R1-R2|, |G1-G2|, and |B1-B2| are all <= tolerance.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Maximum difference allowed per RGB channel. 0 requires equal channels; 255 accepts any RGB color. Negative values use 0. Increase gradually using real screen samples.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true when all three RGB channels are within tolerance; false otherwise.","example":"base = Color(\"#FF4CAF50\")\nsample = Color.get(Point(620, 340))\nis_same = Color.compare(base, sample, tolerance=8)  # same-ish UI shade","aliases":[],"group":"FLOW"},{"key":"class-color-static-method-distance-rgb","kind":"STATIC_METHOD","parentKey":"class-color","name":"distance_rgb","signature":"Color.distance_rgb(a, b)","description":"Measure the combined red, green, and blue difference between two colors. Smaller values mean closer RGB values; transparency is ignored.","behavior":"Measure the combined red, green, and blue difference between two colors. Smaller values mean closer RGB values; transparency is ignored.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"Distance from 0 to about 441.67; 0 means identical RGB channels. Choose a threshold using samples from your screen.","example":"actual = Color.get(Point(620, 340))\nrgb_gap = Color.distance_rgb(\"#FF4CAF50\", actual)\nif rgb_gap <= 15:\n    print(\"close in RGB\")","aliases":[],"group":"FLOW"},{"key":"class-color-static-method-delta-e","kind":"STATIC_METHOD","parentKey":"class-color","name":"delta_e","signature":"Color.delta_e(a, b)","description":"Estimate how different two colors look using CIE76 Delta E, a color difference measure. Smaller values mean more similar colors; transparency is ignored.","behavior":"Estimate how different two colors look using CIE76 Delta E, a color difference measure. Smaller values mean more similar colors; transparency is ignored.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"A nonnegative difference score; 0 means identical RGB channels. Test a threshold on your own screen, since perceived similarity varies.","example":"actual = Color.get(Point(620, 340))\nd = Color.delta_e(\"#FF4CAF50\", actual)\nif d <= 3:\n    print(\"looks similar to human eye\")","aliases":[],"group":"FLOW"},{"key":"class-color-method-compare","kind":"METHOD","parentKey":"class-color","name":"compare","signature":"color.compare(other, tolerance=0)","description":"Check whether this color is close to another color. Each RGB channel must differ by no more than tolerance; transparency is ignored.","behavior":"Check whether this color is close to another color. Each RGB channel must differ by no more than tolerance; transparency is ignored.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"Color | String | Number","defaultValue":null,"description":"Color to compare.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Maximum difference allowed per RGB channel. 0 requires equal channels; 255 accepts any RGB color. Negative values use 0. Increase gradually using real screen samples.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true when all three RGB channels are within tolerance; false otherwise.","example":"picked = Color.get(Point(540, 920))\nif picked.compare(\"#FFFFFFFF\", tolerance=5):\n    click(Point(540, 920))","aliases":[],"group":"FLOW"},{"key":"class-color-method-distance-rgb","kind":"METHOD","parentKey":"class-color","name":"distance_rgb","signature":"color.distance_rgb(other)","description":"Measure the combined RGB difference from this color to another, ignoring transparency.","behavior":"Measure the combined RGB difference from this color to another, ignoring transparency.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"Color | String | Number","defaultValue":null,"description":"Color to compare.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"Distance from 0 to about 441.67; 0 means identical RGB channels. Choose a threshold using samples from your screen.","example":"base = Color(\"#FF4CAF50\")\nactual = Color.get(Point(620, 340))\nrgb_gap = base.distance_rgb(actual)\nif rgb_gap <= 20:\n    print(\"close enough in RGB\")","aliases":[],"group":"FLOW"},{"key":"class-color-method-delta-e","kind":"METHOD","parentKey":"class-color","name":"delta_e","signature":"color.delta_e(other)","description":"Estimate how different this color looks from another using CIE76 Delta E, ignoring transparency.","behavior":"Estimate how different this color looks from another using CIE76 Delta E, ignoring transparency.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"Color | String | Number","defaultValue":null,"description":"Color to compare.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"A nonnegative difference score; 0 means identical RGB channels. Test a threshold on your own screen, since perceived similarity varies.","example":"base = Color(\"#FF4CAF50\")\nactual = Color.get(Point(620, 340))\nperceptual_gap = base.delta_e(actual)\nif perceptual_gap <= 2:\n    print(\"looks almost the same\")","aliases":[],"group":"FLOW"},{"key":"class-overlaytext","kind":"CLASS","parentKey":null,"name":"OverlayText","signature":"OverlayText(text=\"\", position=(0, 0), color=\"#FFFFFFFF\", size=16, background=None)","description":"Create text over other apps. Call show() to display it and to apply later changes. Enable press, drag or hold tracking with track(). Read current values with state(); text() and background() are methods.","behavior":"Create text over other apps. Call show() to display it and to apply later changes. Enable press, drag or hold tracking with track(). Read current values with state(); text() and background() are methods.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":true,"fields":["x","y","scale","anchor","argb","size_sp"],"fieldDocs":[{"name":"x","type":"Number","defaultValue":"0","description":"Top-left X position in pixels. Writable before show().","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"y","type":"Number","defaultValue":"0","description":"Top-left Y position in pixels. Writable before show().","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale copied from Point positions.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor copied from Point positions.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"argb","type":"Color","defaultValue":"white","description":"Text color. Assign with Color/string/number values. Use overlay.color(value) for method chaining.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"size_sp","type":"Number","defaultValue":"16","description":"Text size in sp. Use overlay.size(sp) for method chaining.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"text","type":"String","defaultValue":"\"\"","description":"Initial text content.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"position","type":"Point | tuple[Number, Number]","defaultValue":"(0, 0)","description":"Initial position as Point or tuple/list (x, y). Point carries scale/anchor metadata.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"color","type":"Color | String | Number","defaultValue":"white","description":"Initial text color.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"size","type":"Number","defaultValue":"16","description":"Initial text size (sp).","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"background","type":"Color | String | Number | None","defaultValue":"None","description":"Initial background color. None means transparent/no background.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":"badge = OverlayText(\"Ready\", Point(420, 220, scale=\"width\", anchor=\"top\"), background=None)\nbadge.show()","params":[],"returnType":null,"returnDescription":null,"example":"badge = OverlayText(\"Running...\", Point(320, 160, scale=\"width\", anchor=\"top\"), background=None)\nbadge.color(\"#FF00E676\").background(\"#66000000\").size(18).track(press=True, move=True, hold=True, hold_ms=700)\nbadge.show()\n\nstate = badge.state()\nif state[\"status\"] == 2:\n    MacroPanel.notify(\"Badge is moving\")\n\np = badge.get_point()\nr = badge.get_region()\nif r is not None:\n    r.highlight(\"yellow\", auto_hide_ms=600)\n\nbadge.hide()   # hide fast\nbadge.show()   # show again quickly\nbadge.off()    # fully release","aliases":[],"group":null},{"key":"class-overlaytext-static-method-off-all","kind":"STATIC_METHOD","parentKey":"class-overlaytext","name":"off_all","signature":"OverlayText.off_all()","description":"Turn off and release every overlay text created by the current flow, without affecting parallel flows.","behavior":"Turn off and release every overlay text created by the current flow, without affecting parallel flows.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Release overlays owned by this flow\na = OverlayText(\"Running\", (24, 120))\na.show()\nOverlayText.off_all()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-text","kind":"METHOD","parentKey":"class-overlaytext","name":"text","signature":"overlay.text(value)","description":"Set text content. Call show() to update the text on screen.","behavior":"Set text content. Call show() to update the text on screen.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"String","defaultValue":null,"description":"Text content.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\nbadge.text(\"Running\")\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-color","kind":"METHOD","parentKey":"class-overlaytext","name":"color","signature":"overlay.color(value)","description":"Update text color.","behavior":"Update text color.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Color | String | Number","defaultValue":null,"description":"Color value.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.color(\"#FF00E676\")\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-background","kind":"METHOD","parentKey":"class-overlaytext","name":"background","signature":"overlay.background(value=None)","description":"Update background color. Passing None removes the background.","behavior":"Update background color. Passing None removes the background.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Color | String | Number | None","defaultValue":"None","description":"Background color, or None for transparent/no background.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.background(\"#66000000\")\nbadge.show()\nbadge.background(None)\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-size","kind":"METHOD","parentKey":"class-overlaytext","name":"size","signature":"overlay.size(sp)","description":"Update text size (sp).","behavior":"Update text size (sp).","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sp","type":"Number","defaultValue":null,"description":"Text size in sp.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.size(20)\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-position","kind":"METHOD","parentKey":"class-overlaytext","name":"position","signature":"overlay.position(position)","description":"Update draw position with a Point or tuple/list (x, y). Point carries scale/anchor metadata.","behavior":"Update draw position with a Point or tuple/list (x, y). Point carries scale/anchor metadata.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"position","type":"Point | tuple[Number, Number]","defaultValue":null,"description":"New position.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.position((80, 160))\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-track","kind":"METHOD","parentKey":"class-overlaytext","name":"track","signature":"overlay.track(press=False, move=False, hold=False, hold_ms=600)","description":"Configure press, drag and hold tracking. If all flags are False, the text stays fixed and touches pass through it. Where a movable highlight overlaps the text, enabled text interaction receives touches first. A gesture that starts outside the text stays with the highlight.","behavior":"Configure press, drag and hold tracking. If all flags are False, the text stays fixed and touches pass through it. Where a movable highlight overlaps the text, enabled text interaction receives touches first. A gesture that starts outside the text stays with the highlight.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"press","type":"Boolean","defaultValue":"False","description":"Report PRESSED after a short press is released without dragging or holding.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"move","type":"Boolean","defaultValue":"False","description":"Allow dragging the text. Movement within the device touch threshold does not move it; dragging starts after the threshold is exceeded.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"hold","type":"Boolean","defaultValue":"False","description":"Report HOLDING after hold_ms, then HOLDED when released; dragging takes priority.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"hold_ms","type":"Number","defaultValue":"600","description":"Time to hold before HOLDING, in milliseconds. Values below 150 use 150.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"OverlayText","returnDescription":"Returns this overlay so you can call another method on it.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.track(press=True, move=True, hold=True, hold_ms=700)\nbadge.show()\nprint(badge.state())","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-get-point","kind":"METHOD","parentKey":"class-overlaytext","name":"get_point","signature":"overlay.get_point()","description":"Get current top-left point of this overlay text. This position is updated after drag moves. This does not consume interaction events.","behavior":"Get current top-left point of this overlay text. This position is updated after drag moves. This does not consume interaction events.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Point","returnDescription":"Current overlay position in screen pixels.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\npoint = badge.get_point()\nprint(point.x, point.y)","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-get-region","kind":"METHOD","parentKey":"class-overlaytext","name":"get_region","signature":"overlay.get_region()","description":"Get a region that wraps current overlay text bounds. Returns None when the overlay is not visible or not measured yet. This does not consume interaction events.","behavior":"Get a region that wraps current overlay text bounds. Returns None when the overlay is not visible or not measured yet. This does not consume interaction events.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Region?","returnDescription":"Bounding region for overlay text, or None. Always check for None before using the region.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\nbounds = badge.get_region()\nif bounds is not None:\n    print(bounds.width, bounds.height)","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-show","kind":"METHOD","parentKey":"class-overlaytext","name":"show","signature":"overlay.show()","description":"Show the text, including after hide(), and apply changes to its content, style, position, tracking or writable fields. Call show() again after each configuration change.\nIf only the position changes while visible, only the latest position is kept for the next display frame. The call returns before it appears: returned x/y are the accepted position, and overlay_width_px/overlay_height_px are None. Other updates wait until applied.\nWhile visible, show() preserves interaction state and events if tracking is unchanged. Showing after hide() or changing tracking resets to IDLE; changing tracking also cancels the previous gesture.","behavior":"Show the text, including after hide(), and apply changes to its content, style, position, tracking or writable fields. Call show() again after each configuration change.\nIf only the position changes while visible, only the latest position is kept for the next display frame. The call returns before it appears: returned x/y are the accepted position, and overlay_width_px/overlay_height_px are None. Other updates wait until applied.\nWhile visible, show() preserves interaction state and events if tracking is unchanged. Showing after hide() or changing tracking resets to IDLE; changing tracking also cancels the previous gesture.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\nbadge.text(\"Running\")\nprint(badge.show())","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-hide","kind":"METHOD","parentKey":"class-overlaytext","name":"hide","signature":"overlay.hide()","description":"Hide the text. Call show() to display it again.","behavior":"Hide the text. Call show() to display it again.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\nbadge.hide()\nbadge.show()","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-off","kind":"METHOD","parentKey":"class-overlaytext","name":"off","signature":"overlay.off()","description":"Turn off overlay text and release resources.","behavior":"Turn off overlay text and release resources.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.show()\nprint(badge.off())","aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-state","kind":"METHOD","parentKey":"class-overlaytext","name":"state","signature":"overlay.state()","description":"Read the latest state. With the corresponding tracking enabled:\nPress and release → PRESSED (1).\nDrag → MOVING (2); release → MOVED (4).\nHold for hold_ms → HOLDING (3); release → HOLDED (7).\nOther states: IDLE (0), HIDDEN (5), OFF (6). Pressing down alone creates no event; dragging takes priority over holding.\nPRESSED, MOVED and HOLDED are returned once, then reset to IDLE. MOVING and HOLDING remain while active. Only the latest state is kept; a new event replaces an unread one. Cancellation creates no completion event. Pending position changes are applied before reading.\nOnly state() consumes terminal events. They do not expire, but polling every 100 ms cannot retain every event between reads.","behavior":"Read the latest state. With the corresponding tracking enabled:\nPress and release → PRESSED (1).\nDrag → MOVING (2); release → MOVED (4).\nHold for hold_ms → HOLDING (3); release → HOLDED (7).\nOther states: IDLE (0), HIDDEN (5), OFF (6). Pressing down alone creates no event; dragging takes priority over holding.\nPRESSED, MOVED and HOLDED are returned once, then reset to IDLE. MOVING and HOLDING remain while active. Only the latest state is kept; a new event replaces an unread one. Cancellation creates no completion event. Pending position changes are applied before reading.\nOnly state() consumes terminal events. They do not expire, but polling every 100 ms cannot retain every event between reads.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"off_all() removes only the current flow’s overlays. Display updates may wait. Create and change each OverlayText in one flow."},"limitations":[],"relatedApis":["class-overlaytext-static-method-off-all","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"State dictionary with status/status_label, tracking flags, and optional overlay width/height in pixels.","example":"# Configure or inspect a flow-owned overlay\nbadge = OverlayText(\"Ready\", (24, 120))\nbadge.track(press=True, move=True)\nbadge.show()\nstate = badge.state()\nprint(state[\"status_label\"])","aliases":[],"group":"FLOW"},{"key":"class-timer","kind":"CLASS","parentKey":null,"name":"Timer","signature":"Timer(auto_start=True)","description":"Measure elapsed time in milliseconds. Pause and resume without losing the time already counted.","behavior":"Measure elapsed time in milliseconds. Pause and resume without losing the time already counted.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["auto_start"],"fieldDocs":[{"name":"auto_start","type":"Boolean","defaultValue":"True","description":"Whether the timer starts immediately after creation. Assign True to start; assign False to pause.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"auto_start","type":"Boolean","defaultValue":"True","description":"Start counting immediately after creation.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":"timer = Timer()\nif timer.is_elapsed(500):\n    text(\"half-second passed\")","params":[],"returnType":null,"returnDescription":null,"example":"timer = Timer(auto_start=False)\ntimer.start()\nwhile not timer.is_elapsed(2000):\n    wait(50)\ntimer.stop()","aliases":[],"group":null},{"key":"class-timer-method-start","kind":"METHOD","parentKey":"class-timer","name":"start","signature":"timer.start()","description":"Start counting if the timer is currently stopped.","behavior":"Start counting if the timer is currently stopped.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer(auto_start=False)\ntimer.start()\nwait(100)\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-pause","kind":"METHOD","parentKey":"class-timer","name":"pause","signature":"timer.pause()","description":"Pause counting while preserving elapsed milliseconds.","behavior":"Pause counting while preserving elapsed milliseconds.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer()\nwait(100)\ntimer.pause()\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-resume","kind":"METHOD","parentKey":"class-timer","name":"resume","signature":"timer.resume()","description":"Continue counting, or start if the timer has never run.","behavior":"Continue counting, or start if the timer has never run.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer()\ntimer.pause()\ntimer.resume()\nwait(100)\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-stop","kind":"METHOD","parentKey":"class-timer","name":"stop","signature":"timer.stop()","description":"Stop counting and keep elapsed milliseconds frozen.","behavior":"Stop counting and keep elapsed milliseconds frozen.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer()\nwait(100)\ntimer.stop()\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-reset","kind":"METHOD","parentKey":"class-timer","name":"reset","signature":"timer.reset()","description":"Reset elapsed time to 0 while keeping the current running state.","behavior":"Reset elapsed time to 0 while keeping the current running state.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer()\nwait(100)\ntimer.reset()\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-restart","kind":"METHOD","parentKey":"class-timer","name":"restart","signature":"timer.restart()","description":"Reset elapsed time to 0 and start counting immediately.","behavior":"Reset elapsed time to 0 and start counting immediately.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns this timer so you can call another method on it.","example":"# Measure time in the calling flow\ntimer = Timer(auto_start=False)\ntimer.restart()\nwait(100)\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-elapsed-ms","kind":"METHOD","parentKey":"class-timer","name":"elapsed_ms","signature":"timer.elapsed_ms()","description":"Read total elapsed milliseconds.","behavior":"Read total elapsed milliseconds.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Elapsed milliseconds.","example":"# Measure time in the calling flow\ntimer = Timer()\nwait(100)\nprint(timer.elapsed_ms())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-is-elapsed","kind":"METHOD","parentKey":"class-timer","name":"is_elapsed","signature":"timer.is_elapsed(time)","description":"Check whether elapsed time is greater than or equal to the provided milliseconds.","behavior":"Check whether elapsed time is greater than or equal to the provided milliseconds.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"time","type":"Number","defaultValue":null,"description":"Time to compare, in milliseconds. Negative values use 0; the fractional part is removed.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true when elapsed time reached or exceeded the threshold.","example":"# Measure time in the calling flow\ntimer = Timer()\nwait(500)\nif timer.is_elapsed(500):\n    print(\"Elapsed\")","aliases":[],"group":"FLOW"},{"key":"class-timer-method-is-running","kind":"METHOD","parentKey":"class-timer","name":"is_running","signature":"timer.is_running()","description":"Check whether the timer is currently counting.","behavior":"Check whether the timer is currently counting.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true when timer is counting.","example":"# Measure time in the calling flow\ntimer = Timer()\nprint(timer.is_running())","aliases":[],"group":"FLOW"},{"key":"class-timer-method-is-paused","kind":"METHOD","parentKey":"class-timer","name":"is_paused","signature":"timer.is_paused()","description":"Check whether the timer is paused after being started.","behavior":"Check whether the timer is paused after being started.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true when timer is paused.","example":"# Measure time in the calling flow\ntimer = Timer()\ntimer.pause()\nprint(timer.is_paused())","aliases":[],"group":"FLOW"},{"key":"class-tflitemodel","kind":"CLASS","parentKey":null,"name":"TfliteModel","signature":"TfliteModel(model)","description":"Use a TFLite model imported in Template Manager to recognize objects or classify an image. Select the correct model type there.\nSupported outputs: YOLOv8/YOLO11 detection [1,N,4+C]/[1,4+C,N]; YOLO26 detection [1,N,6]/[N,6]; YOLO11/YOLO26 and MobileNetV3 classification [1,C]. FLOAT32, INT8 and UINT8 are supported automatically.\nClassification returns class scores and metadata without screen points or bounds. Inference requires a local model file; failure to obtain it raises an error.","behavior":"Use a TFLite model imported in Template Manager to recognize objects or classify an image. Select the correct model type there.\nSupported outputs: YOLOv8/YOLO11 detection [1,N,4+C]/[1,4+C,N]; YOLO26 detection [1,N,6]/[N,6]; YOLO11/YOLO26 and MobileNetV3 classification [1,C]. FLOAT32, INT8 and UINT8 are supported automatically.\nClassification returns class scores and metadata without screen points or bounds. Inference requires a local model file; failure to obtain it raises an error.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["model","resize_mode","color_mode","norm_mode","padding_color"],"fieldDocs":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference in current macro (prefer template model name; legacy model id still accepted).","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"resize_mode","type":"String","defaultValue":"LETTERBOX","description":"How the image is resized: LETTERBOX preserves its proportions and adds padding; STRETCH fills the input size; CROP_CENTER crops the center.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"color_mode","type":"String","defaultValue":"RGB","description":"Image color format used by the model: RGB, BGR or GRAYSCALE.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"norm_mode","type":"String","defaultValue":"ZERO_ONE","description":"How pixel values are converted for the model: ZERO_ONE, MINUS_ONE_ONE, IMAGENET or CUSTOM.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"padding_color","type":"Int","defaultValue":"114","description":"Value from 0 to 255 used to fill the border added by LETTERBOX.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference to use for inference (prefer template model name).","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":"# Import a supported TFLite model and choose its output type in Template Manager.\n# Create a model handle bound to one TFLite model name in Template Manager.\nmodel = TfliteModel(\"enemy_model\")","params":[],"returnType":null,"returnDescription":null,"example":"# Check model availability before running detection\nif TfliteModel.exists(\"enemy_model\"):\n    detector = TfliteModel(\"enemy_model\")\n    hits = detector.inference()\n    if len(hits) > 0:\n        click(hits[0])","aliases":[],"group":null},{"key":"class-tflitemodel-static-method-exists","kind":"STATIC_METHOD","parentKey":"class-tflitemodel","name":"exists","signature":"TfliteModel.exists(model)","description":"Check whether a local TFLite model file (resolved by model name or legacy id) is currently available in this macro.","behavior":"Check whether a local TFLite model file (resolved by model name or legacy id) is currently available in this macro.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference to check.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true if local model file is ready to use.","example":"# Check a model imported in Template Manager\nif TfliteModel.exists(\"enemy_detector\"):\n    print(\"Model available\")","aliases":[],"group":"FLOW"},{"key":"class-tflitemodel-static-method-list","kind":"STATIC_METHOD","parentKey":"class-tflitemodel","name":"list","signature":"TfliteModel.list()","description":"Return local model references currently available for the macro (prefer display names).","behavior":"Return local model references currently available for the macro (prefer display names).","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[String]","returnDescription":"Model reference list.","example":"# List models available to this macro\nprint(TfliteModel.list())","aliases":[],"group":"FLOW"},{"key":"class-tflitemodel-method-exists","kind":"METHOD","parentKey":"class-tflitemodel","name":"exists","signature":"model.exists()","description":"Check whether this detector's local model file is available.","behavior":"Check whether this detector's local model file is available.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true if the local model file can be used immediately.","example":"# Create only after confirming the imported model exists\nif TfliteModel.exists(\"enemy_detector\"):\n    model = TfliteModel(\"enemy_detector\")\n    print(model.exists())","aliases":[],"group":"FLOW"},{"key":"class-tflitemodel-method-inference","kind":"METHOD","parentKey":"class-tflitemodel","name":"inference","signature":"model.inference(threshold=0.5, region=None, max_results=8, debug=False)","description":"Run the model on one current screen image or the supplied region and return a MatchList across all classes. An empty list means no matches or no screen frame available yet. Missing capture permission, model loading or execution failures raise errors.\nA region crops the image before model processing. Use images similar to the model’s training data; cropping can reduce accuracy. Classification results have no point or bounds.\nIn Edit mode, the Recognition Debug Frame setting draws the scan region in red and detection boxes in green, including when debug=False. Classification only shows the scan region.","behavior":"Run the model on one current screen image or the supplied region and return a MatchList across all classes. An empty list means no matches or no screen frame available yet. Missing capture permission, model loading or execution failures raise errors.\nA region crops the image before model processing. Use images similar to the model’s training data; cropping can reduce accuracy. Classification results have no point or bounds.\nIn Edit mode, the Recognition Debug Frame setting draws the scan region in red and detection boxes in green, including when debug=False. Classification only shows the scan region.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"threshold","type":"Number","defaultValue":"0.5","description":"Minimum confidence from 0 to 1. The app uses at least 0.01 when running the model.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"region","type":"Region?","defaultValue":"None","description":"Optional screen region. Its image is cropped before preprocessing and inference, which can reduce accuracy if the model was not trained on similarly cropped images.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max_results","type":"Int","defaultValue":"8","description":"Maximum results to return. The fractional part is removed, then the value is limited to 1..64.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"debug","type":"Boolean","defaultValue":"False","description":"True opens an image preview and model results in Edit mode. Detection previews show boxes and classes; classification previews show the input image and class scores. Run-only mode ignores this option. Returned Match values do not include debug_result.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MatchList","returnDescription":"Inference matches list across all classes.","example":"# Run raw model inference and inspect preprocess debug output\ndetector = TfliteModel(\"enemy_model\")\nsearch = Region(100, 200, 300, 400)\nhits = detector.inference(threshold=0.55, region=search, max_results=12, debug=True)\ntext(str(len(hits)))","aliases":[],"group":"FLOW"},{"key":"class-flow","kind":"READ_ONLY_CLASS","parentKey":null,"name":"Flow","signature":"Flow","description":"Run named macro flows in parallel and send messages between them. Each flow has its own variables. Pass starting data with Flow.params; messages are independent copies read in the order sent.","behavior":"Run named macro flows in parallel and send messages between them. Each flow has its own variables. Pass starting data with Flow.params; messages are independent copies read in the order sent.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"yes","details":"Flow.start() returns a positive Int sequence number. At most two background flows run beside the main flow. The macro waits for them; any flow error or System.stop() stops all."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-storage","class-screencapture"],"isCallable":false,"fields":[],"fieldDocs":[{"name":"params","type":"dict","defaultValue":null,"description":"Starting data for this flow. Each read returns an independent dict; changing it does not change the sender or later reads. The main flow receives an empty dict.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Save an enemy template and configure watch_enemy before running\n# Main: arm the watcher and stop it after the main task\nFlow.start(\"watch_enemy\")\nFlow.send(\"watch_enemy\", {\"command\": \"ARM\"})\nwait(1000)\nFlow.stop(\"watch_enemy\")","aliases":[],"group":null},{"key":"class-flow-static-method-start","kind":"STATIC_METHOD","parentKey":"class-flow","name":"start","signature":"Flow.start(name, params=None)","description":"Start a configured flow alongside the main flow. You can send messages as soon as this call returns. At most two background flows can run; they may also start other flows.\nA name cannot run twice, even while paused or stopping. Invalid or duplicate names, a full background limit, or a flow error stops the entire Run. System.stop() and Main Stop also stop all flows.\nThe main flow waits for background flows before Run finishes: explicitly stop flows that run indefinitely. Starting data is copied using the limits in Flow.send().","behavior":"Start a configured flow alongside the main flow. You can send messages as soon as this call returns. At most two background flows can run; they may also start other flows.\nA name cannot run twice, even while paused or stopping. Invalid or duplicate names, a full background limit, or a flow error stops the entire Run. System.stop() and Main Stop also stop all flows.\nThe main flow waits for background flows before Run finishes: explicitly stop flows that run indefinitely. Starting data is copied using the limits in Flow.send().","execution":{"blocking":"no","threadSafety":"serialized","parallel":"yes","details":"Starts a named background flow with copied inputs, then returns without waiting for completion."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Exact name of the configured flow.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"params","type":"dict?","defaultValue":"None","description":"Optional starting data copied for the new flow and available through Flow.params.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Int","returnDescription":"A positive number that increases with each start, used in dock status and logs. It cannot be used to control the flow.","example":"# Start recognition and telemetry beside the main flow\nrecognition_no = Flow.start(\"recognition\", {\"region\": \"arena\", \"threshold\": 0.86})\ntelemetry_no = Flow.start(\"telemetry\")\n\n# Inside the configured recognition flow, read this branch's copied input\nregion_name = Flow.params.get(\"region\", \"full_screen\")\nthreshold = Flow.params.get(\"threshold\", 0.8)","aliases":[],"group":"FLOW"},{"key":"class-flow-static-method-send","kind":"STATIC_METHOD","parentKey":"class-flow","name":"send","signature":"Flow.send(name, data)","description":"Send an independent copy to a running flow without waiting. Messages are safe to send from multiple flows and are received in the order sent, including while paused. Allowed values are None, Boolean, finite numbers, String, list, tuple and dict with String keys. Maximum nesting depth is 8, total values 512 and total text length 65536. Functions, resource or app objects, and circular references cause an error. Each start has a new message queue; stopping or finishing discards unread messages.","behavior":"Send an independent copy to a running flow without waiting. Messages are safe to send from multiple flows and are received in the order sent, including while paused. Allowed values are None, Boolean, finite numbers, String, list, tuple and dict with String keys. Maximum nesting depth is 8, total values 512 and total text length 65536. Functions, resource or app objects, and circular references cause an error. Each start has a new message queue; stopping or finishing discards unread messages.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"yes","details":"Coordinates simultaneous calls without waiting for messages or cleanup. Flow.stop() targets one background flow; the main and other flows continue."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Exact configured name of the target flow. The main flow has no automatically assigned name.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"data","type":"Any","defaultValue":null,"description":"Value to send. It is copied before being added to the message queue.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"True if accepted; False for an unknown, inactive or stopping target.","example":"# Send an ARM command to the configured watcher\nFlow.start(\"watch_enemy\")\naccepted = Flow.send(\"watch_enemy\", {\"command\": \"ARM\"})\nprint(accepted)","aliases":[],"group":"FLOW"},{"key":"class-flow-static-method-receive","kind":"STATIC_METHOD","parentKey":"class-flow","name":"receive","signature":"Flow.receive(timeout=None)","description":"Wait for and remove the oldest message for this flow. The main flow and background flows can receive messages. A nested named group running in the same flow shares that flow’s queue.\nCancellation ends the wait promptly; Pause keeps queued messages. Received lists and dicts are independent copies.","behavior":"Wait for and remove the oldest message for this flow. The main flow and background flows can receive messages. A nested named group running in the same flow shares that flow’s queue.\nCancellation ends the wait promptly; Pause keeps queued messages. Received lists and dicts are independent copies.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"yes","details":"Waits for this flow’s message or timeout. timeout=0 checks immediately. Stopping the flow promptly ends the wait."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"timeout","type":"Number?","defaultValue":"None","description":"Optional finite timeout in milliseconds: 0 <= timeout < 2^63. Fractional milliseconds are truncated; None waits indefinitely, 0 checks immediately.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Any?","returnDescription":"The oldest message, or None if the wait times out or an immediate check finds no message. A message containing None also returns None.","example":"# Configured watch_enemy flow: wait for ARM, then check commands between work\nmessage = Flow.receive()\nif message is not None and message.get(\"command\") == \"ARM\":\n    while True:\n        command = Flow.poll()\n        if command is not None:\n            print(command)\n        if Region().find(\"enemy\", timeout=0).found:\n            print(\"enemy\")\n        wait(100)","aliases":[],"group":"FLOW"},{"key":"class-flow-static-method-poll","kind":"STATIC_METHOD","parentKey":"class-flow","name":"poll","signature":"Flow.poll()","description":"Immediately take the oldest message for this flow without waiting. Uses the same message queue and independent copies as Flow.receive().","behavior":"Immediately take the oldest message for this flow without waiting. Uses the same message queue and independent copies as Flow.receive().","execution":{"blocking":"no","threadSafety":"serialized","parallel":"yes","details":"Coordinates simultaneous calls without waiting for messages or cleanup. Flow.stop() targets one background flow; the main and other flows continue."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Any?","returnDescription":"The oldest message, or None if there is no message. A message containing None also returns None.","example":"# Check for a command without waiting\nmessage = Flow.poll()\nif message is not None:\n    print(message)","aliases":[],"group":"FLOW"},{"key":"class-flow-static-method-running","kind":"STATIC_METHOD","parentKey":"class-flow","name":"running","signature":"Flow.running(name)","description":"Check whether the named flow is running or paused. The result may change immediately after the call.","behavior":"Check whether the named flow is running or paused. The result may change immediately after the call.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"yes","details":"Coordinates simultaneous calls without waiting for messages or cleanup. Flow.stop() targets one background flow; the main and other flows continue."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Exact configured name of the target flow. The main flow has no automatically assigned name.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"True while active; False when unknown, stopping or completed.","example":"print(Flow.running(\"watch_enemy\"))","aliases":[],"group":"FLOW"},{"key":"class-flow-static-method-stop","kind":"STATIC_METHOD","parentKey":"class-flow","name":"stop","signature":"Flow.stop(name)","description":"Request that one background flow stop; return without waiting for cleanup. The main flow and other flows keep running. This cannot stop the main flow. Stopping yourself ends the calling flow.\nFor a nested named group, stops the background flow that owns it. Wait for cleanup before restarting the same name.\nBackground dock controls provide Pause/Resume. Main Pause/Resume affects all flows; Main Resume also clears their individual pause settings.","behavior":"Request that one background flow stop; return without waiting for cleanup. The main flow and other flows keep running. This cannot stop the main flow. Stopping yourself ends the calling flow.\nFor a nested named group, stops the background flow that owns it. Wait for cleanup before restarting the same name.\nBackground dock controls provide Pause/Resume. Main Pause/Resume affects all flows; Main Resume also clears their individual pause settings.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"yes","details":"Coordinates simultaneous calls without waiting for messages or cleanup. Flow.stop() targets one background flow; the main and other flows continue."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Exact configured name of the target flow. The main flow has no automatically assigned name.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"True for a newly requested stop; False for an absent, unknown, already stopping or main target. True does not confirm cleanup completion.","example":"print(Flow.stop(\"watch_enemy\"))","aliases":[],"group":"FLOW"},{"key":"class-list","kind":"COLLECTION","parentKey":null,"name":"list","signature":"list(iterable=(), /)","description":"Store items in order, including repeated values. Read positions starting at 0, loop through items, or add, replace and remove items in the same list.","behavior":"Store items in order, including repeated values. Read positions starting at 0, loop through items, or add, replace and remove items in the same list.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"numbers = list()\nnumbers.append(2)\nnumbers.extend([0, 3])\nfirst = numbers[0]        # returns 2\ncount = len(numbers)      # returns 3\n\nfor value in numbers:\n    wait(50)              # returns None","aliases":[],"group":null},{"key":"class-list-creation-method-constructor","kind":"CREATION_METHOD","parentKey":"class-list","name":"constructor","signature":"list()\nlist(iterable, /)","description":"Create an empty list or a new list from a source you can loop through, such as a string, list or generator. Items keep their order; nested collections are shared with the source.","behavior":"Create an empty list or a new list from a source you can loop through, such as a string, list or generator. Items keep their order; nested collections are shared with the source.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":"()","description":"Source values to copy into the new list.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"list","returnDescription":"A new mutable list.","example":"numbers = list()\nnumbers.append(2)\nnumbers.append(3)\n\ncopied = list(numbers)","aliases":[],"group":"FLOW"},{"key":"class-list-creation-method-literal","kind":"CREATION_METHOD","parentKey":"class-list","name":"literal","signature":"[1, 2, 3]","description":"Create a list by writing its items between square brackets.","behavior":"Create a list by writing its items between square brackets.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"item","type":"Any?","defaultValue":null,"description":"Each item written inside the brackets.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"list","returnDescription":"A new list with items in the written order.","example":"numbers = [2, 0, 3]\nfirst = numbers[0]       # returns 2","aliases":[],"group":"FLOW"},{"key":"class-list-creation-method-comprehension","kind":"CREATION_METHOD","parentKey":"class-list","name":"comprehension","signature":"[expr for target in iterable if condition]","description":"Build a list from values produced by expr while looping through a source. Use if to keep only matching items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","behavior":"Build a list from values produced by expr while looping through a source. Use if to keep only matching items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"expr","type":"Any?","defaultValue":null,"description":"Value to append for each accepted item.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Variable or group of variables receiving the current item. A target such as *rest is not supported.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source you can loop through, such as a string, collection or generator; a dictionary yields its keys.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before appending.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"list","returnDescription":"A new mutable list with matching items in iteration order.","example":"values = [1, 2, 3, 4]\nevens = [x for x in values if x % 2 == 0]","aliases":[],"group":"FLOW"},{"key":"class-list-creation-method-range-source","kind":"CREATION_METHOD","parentKey":"class-list","name":"range_source","signature":"range(stop, /) | range(start, stop, step=1, /)","description":"Create a new integer list for loops, counters, and numeric ranges.","behavior":"Create a new integer list for loops, counters, and numeric ranges.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Number","defaultValue":"0","description":"Start value (inclusive).","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"stop","type":"Number","defaultValue":null,"description":"End value (exclusive).","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"step","type":"Number","defaultValue":"1","description":"Amount added for each next item. A negative value counts down; 0 raises an error. If the step points away from stop, the result is empty.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"list[Int]","returnDescription":"A new integer list.","example":"numbers = range(5)         # returns [0, 1, 2, 3, 4]\nevens = range(0, 10, 2)   # returns [0, 2, 4, 6, 8]","aliases":[],"group":"FLOW"},{"key":"class-list-method-length","kind":"METHOD","parentKey":"class-list","name":"length","signature":"len(list, /)","description":"Count how many items are in the list.","behavior":"Count how many items are in the list.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The list to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of items in the list.","example":"numbers = range(3, 8)     # returns [3, 4, 5, 6, 7]\ncount = len(numbers)      # returns 5","aliases":[],"group":"FLOW"},{"key":"class-list-method-index-access","kind":"METHOD","parentKey":"class-list","name":"index_access","signature":"list[index]","description":"Read one item by position: 0 is first, -1 is last, and other negative indexes count from the end.","behavior":"Read one item by position: 0 is first, -1 is last, and other negative indexes count from the end.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The source list.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"index","type":"Int","defaultValue":null,"description":"Item position: 0 is first, -1 is last.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"The item at that position. Raises IndexError when the index is outside the list.","example":"numbers = range(10, 15)   # returns [10, 11, 12, 13, 14]\nfirst = numbers[0]        # returns 10\nthird = numbers[2]        # returns 12\nlast = numbers[-1]        # returns 14","aliases":[],"group":"FLOW"},{"key":"class-list-method-slice","kind":"METHOD","parentKey":"class-list","name":"slice","signature":"list[start:end[:step]]","description":"Return a new list from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole list in the step direction; nested collections remain shared.","behavior":"Return a new list from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole list in the step direction; nested collections remain shared.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Int","defaultValue":"start of list","description":"First item index to include.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"end","type":"Int","defaultValue":"end of list","description":"Stop before this item index.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"list","returnDescription":"A new mutable list slice, clamped to the available range.","example":"numbers = [0, 1, 2, 3, 4]\nmiddle = numbers[1:4]     # returns [1, 2, 3]\ntail = numbers[-2:]       # returns [3, 4]\nreverse = numbers[::-1]   # returns [4, 3, 2, 1, 0]","aliases":[],"group":"FLOW"},{"key":"class-list-method-index-assignment","kind":"METHOD","parentKey":"class-list","name":"index_assignment","signature":"list[index] = value","description":"Replace one existing item by index. Negative indexes count from the end. The index must already be inside the list.","behavior":"Replace one existing item by index. Negative indexes count from the end. The index must already be inside the list.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The mutable list to update.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"index","type":"Int","defaultValue":null,"description":"Item index that already exists. Use -1 for the last item.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"},{"name":"value","type":"Any?","defaultValue":null,"description":"New value to store at that position.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The list is updated in place.","example":"numbers = [12, 12, 21, 3, 2, 1]\nnumbers[4] = 3            # numbers becomes [12, 12, 21, 3, 3, 1]","aliases":[],"group":"FLOW"},{"key":"class-list-method-destructuring-assignment","kind":"METHOD","parentKey":"class-list","name":"destructuring_assignment","signature":"a, b = list","description":"Assign list items to variables from left to right. The number of variables must match the number of items or an error is raised. Groups of variables can be nested; *rest is not supported.","behavior":"Assign list items to variables from left to right. The number of variables must match the number of items or an error is raised. Groups of variables can be nested; *rest is not supported.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a, b","type":"Targets","defaultValue":null,"description":"Variables receiving the items; their count must match the list length.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"list","type":"list","defaultValue":null,"description":"Source list to unpack.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. Targets receive list items left to right.","example":"point = [500, 900]\nx, y = point","aliases":[],"group":"FLOW"},{"key":"class-list-method-append","kind":"METHOD","parentKey":"class-list","name":"append","signature":"list.append(value, /)","description":"Add one new item to the end of the list.","behavior":"Add one new item to the end of the list.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"The value to add.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The list is updated in place.","example":"numbers = [2, 0]\nnumbers.append(3)\nlast = numbers[-1]        # returns 3","aliases":[],"group":"FLOW"},{"key":"class-list-method-extend","kind":"METHOD","parentKey":"class-list","name":"extend","signature":"list.extend(iterable, /)","description":"Add each item from a source you can loop through to the end of this list, preserving source order.","behavior":"Add each item from a source you can loop through to the end of this list, preserving source order.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values whose items will be appended.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The list grows in place.","example":"numbers = [1]\nnumbers.extend([2, 3])\ncount = len(numbers)      # returns 3","aliases":[],"group":"FLOW"},{"key":"class-list-method-insert","kind":"METHOD","parentKey":"class-list","name":"insert","signature":"list.insert(index, value, /)","description":"Insert an item before the given position. Positions start at 0; negative indexes count from the end. An index before the list inserts at the beginning; one past the list inserts at the end.","behavior":"Insert an item before the given position. Positions start at 0; negative indexes count from the end. An index before the list inserts at the beginning; one past the list inserts at the end.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"index","type":"Int","defaultValue":null,"description":"Position before which the value is inserted.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"value","type":"Any?","defaultValue":null,"description":"The value to insert.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The list is updated in place.","example":"numbers = [1, 3]\nnumbers.insert(1, 2)      # numbers becomes [1, 2, 3]","aliases":[],"group":"FLOW"},{"key":"class-list-method-remove","kind":"METHOD","parentKey":"class-list","name":"remove","signature":"list.remove(value, /)","description":"Remove the first item whose value matches the given value.","behavior":"Remove the first item whose value matches the given value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to find and remove from the list.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. Raises ValueError when the value is not found.","example":"numbers = [1, 2, 2, 3]\nnumbers.remove(2)         # numbers becomes [1, 2, 3]","aliases":[],"group":"FLOW"},{"key":"class-list-method-pop","kind":"METHOD","parentKey":"class-list","name":"pop","signature":"list.pop(index=-1, /)","description":"Remove one item from the list and return it. Omitting the index removes the last item.","behavior":"Remove one item from the list and return it. Omitting the index removes the last item.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"index","type":"Int","defaultValue":"-1","description":"Optional index to remove. Negative indexes count from the end.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"The removed item. Raises IndexError when the list is empty or the index is outside the list.","example":"numbers = [2, 0, 3]\nremoved = numbers.pop()   # returns 3\nfirst = numbers.pop(0)    # returns 2","aliases":[],"group":"FLOW"},{"key":"class-list-method-clear","kind":"METHOD","parentKey":"class-list","name":"clear","signature":"list.clear()","description":"Remove every item from the list.","behavior":"Remove every item from the list.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No direct return value. The list becomes empty.","example":"numbers = [2, 0, 3]\nnumbers.clear()\ntext(str(len(numbers)))   # returns 0","aliases":[],"group":"FLOW"},{"key":"class-list-method-index","kind":"METHOD","parentKey":"class-list","name":"index","signature":"list.index(value, start=0, stop=len(list), /)","description":"Return the first index whose item equals value within the optional start and stop bounds.","behavior":"Return the first index whose item equals value within the optional start and stop bounds.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to search for.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int","defaultValue":"0","description":"First position to search, included. Positions start at 0; negative values count from the end.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int","defaultValue":"len(list)","description":"Stop before this position. Negative values count from the end.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"The matching index. Raises ValueError when the value is not found.","example":"numbers = [1, 2, 1, 3]\nfirst_one = numbers.index(1)       # returns 0\nlater_one = numbers.index(1, 1)    # returns 2","aliases":[],"group":"FLOW"},{"key":"class-list-method-count","kind":"METHOD","parentKey":"class-list","name":"count","signature":"list.count(value, /)","description":"Count how many items equal the given value.","behavior":"Count how many items equal the given value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of matching items.","example":"numbers = [1, 2, 1, 3]\nones = numbers.count(1)   # returns 2","aliases":[],"group":"FLOW"},{"key":"class-list-method-sort","kind":"METHOD","parentKey":"class-list","name":"sort","signature":"list.sort(*, key=None, reverse=False)","description":"Reorder this list from smallest to largest. Equal comparison values keep their original order. Values must be comparable: numbers and booleans, strings, or lists/tuples of the same kind with comparable items; mixing incompatible kinds raises an error.","behavior":"Reorder this list from smallest to largest. Equal comparison values keep their original order. Values must be comparable: numbers and booleans, strings, or lists/tuples of the same kind with comparable items; mixing incompatible kinds raises an error.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"Processes values in the current flow. A key function runs there too; its waits and changes happen before this call returns."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Callable?","defaultValue":"None","description":"Optional function called once per item to produce the value used for sorting. None compares the items themselves.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"reverse","type":"Boolean","defaultValue":"False","description":"When true, sort from largest to smallest.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"None","returnDescription":"No direct return value. The list is reordered in place.","example":"numbers = [3, 1, 2]\nnumbers.sort()\ntext(str(numbers))        # returns [1, 2, 3]","aliases":[],"group":"FLOW"},{"key":"class-list-method-reverse","kind":"METHOD","parentKey":"class-list","name":"reverse","signature":"list.reverse()","description":"Reverse the list in place.","behavior":"Reverse the list in place.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No direct return value. The list order is reversed in place.","example":"numbers = [1, 2, 3]\nnumbers.reverse()         # numbers becomes [3, 2, 1]","aliases":[],"group":"FLOW"},{"key":"class-list-method-copy","kind":"METHOD","parentKey":"class-list","name":"copy","signature":"list.copy()","description":"Return a new list with the same items. Adding, removing or replacing items in the copy does not change the original; nested collections are still shared.","behavior":"Return a new list with the same items. Adding, removing or replacing items in the copy does not change the original; nested collections are still shared.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A new list; nested collections are not copied.","example":"numbers = [1, 2]\ncopied = numbers.copy()\ncopied.append(3)\ncount = len(numbers)      # returns 2","aliases":[],"group":"FLOW"},{"key":"class-list-method-for-loop","kind":"METHOD","parentKey":"class-list","name":"for_loop","signature":"for item in list:","description":"Loop through items in order from left to right.","behavior":"Loop through items in order from left to right.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"item","type":"Any","defaultValue":null,"description":"Current item inside the loop.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"list","type":"list","defaultValue":null,"description":"The list to iterate.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No direct return value. The loop runs its body once per item.","example":"steps = range(1, 4)      # returns [1, 2, 3]\nfor step in steps:\n    wait(step * 100)      # returns None","aliases":[],"group":"FLOW"},{"key":"class-list-method-truthy-check","kind":"METHOD","parentKey":"class-list","name":"truthy_check","signature":"if list | if not list","description":"Check whether the list has at least one item. An empty list is treated as false.","behavior":"Check whether the list has at least one item. An empty list is treated as false.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The list used in the condition.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean condition","returnDescription":"true when the list is not empty, false when it is empty.","example":"numbers = range(0)        # returns []\nif not numbers:\n    text(\"No items\")      # returns None","aliases":[],"group":"FLOW"},{"key":"class-tuple","kind":"COLLECTION","parentKey":null,"name":"tuple","signature":"tuple(iterable=(), /)\n(value1, value2, ...)","description":"Store ordered items, including duplicates, without adding, removing or replacing them after creation. A nested list or dictionary can still change. In conditions, an empty tuple is false and a non-empty tuple is true.","behavior":"Store ordered items, including duplicates, without adding, removing or replacing them after creation. A nested list or dictionary can still change. In conditions, an empty tuple is false and a non-empty tuple is true.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"offset = (0, 1)\nx = offset[0]\ny = offset[1]\nif 1 in offset:\n    text(\"offset ready\")","aliases":[],"group":null},{"key":"class-tuple-creation-method-constructor","kind":"CREATION_METHOD","parentKey":"class-tuple","name":"constructor","signature":"tuple()\ntuple(iterable, /)","description":"Create an empty tuple or copy items from a source you can loop through into a tuple. Nested collections remain shared with the source.","behavior":"Create an empty tuple or copy items from a source you can loop through into a tuple. Nested collections remain shared with the source.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":"()","description":"Optional source you can loop through, such as a string, list or generator.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"tuple","returnDescription":"A new read-only tuple.","example":"coords = (120, 340)\ncopy = tuple(coords)","aliases":[],"group":"FLOW"},{"key":"class-tuple-creation-method-literal","kind":"CREATION_METHOD","parentKey":"class-tuple","name":"literal","signature":"(value1, value2, ...)","description":"Create a tuple with comma-separated items. Use (value,) for one item; (value) alone is not a tuple.","behavior":"Create a tuple with comma-separated items. Use (value,) for one item; (value) alone is not a tuple.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Each item written inside tuple parentheses.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"tuple","returnDescription":"A new tuple preserving literal order.","example":"offset = (0, 1)\nclick(Point(500, 900), offset=offset)","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-length","kind":"METHOD","parentKey":"class-tuple","name":"length","signature":"len(tuple, /)","description":"Count how many items are in the tuple.","behavior":"Count how many items are in the tuple.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"tuple","type":"tuple","defaultValue":null,"description":"The tuple to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of tuple items.","example":"offset = (0, 1)\ncount = len(offset)      # returns 2","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-index-access","kind":"METHOD","parentKey":"class-tuple","name":"index_access","signature":"tuple[index]","description":"Read one tuple item by position: 0 is first, -1 is last, and other negative indexes count from the end.","behavior":"Read one tuple item by position: 0 is first, -1 is last, and other negative indexes count from the end.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"index","type":"Int","defaultValue":null,"description":"Item position: 0 is first, -1 is last.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"The item at that position. Raises IndexError when the position is outside the tuple.","example":"pair = (10, 20)\nx = pair[0]              # returns 10\ny = pair[-1]             # returns 20","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-slice","kind":"METHOD","parentKey":"class-tuple","name":"slice","signature":"tuple[start:end[:step]]","description":"Return a new tuple from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole tuple in the step direction; nested collections remain shared.","behavior":"Return a new tuple from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole tuple in the step direction; nested collections remain shared.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Int","defaultValue":"start of tuple","description":"First item index to include.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"end","type":"Int","defaultValue":"end of tuple","description":"Stop before this item index.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"tuple","returnDescription":"A new tuple slice, clamped to the available range.","example":"values = (0, 1, 2, 3, 4)\nmiddle = values[1:4]     # returns (1, 2, 3)\nreverse = values[::-1]   # returns (4, 3, 2, 1, 0)","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-destructuring-assignment","kind":"METHOD","parentKey":"class-tuple","name":"destructuring_assignment","signature":"x, y = tuple","description":"Assign tuple items to variables from left to right. The number of variables must match the number of items or an error is raised. Groups of variables can be nested; *rest is not supported.","behavior":"Assign tuple items to variables from left to right. The number of variables must match the number of items or an error is raised. Groups of variables can be nested; *rest is not supported.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"x, y","type":"Targets","defaultValue":null,"description":"Variables receiving the items; their count must match the tuple length.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple to unpack.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. Targets receive tuple items left to right.","example":"label, (x, y) = (\"target\", (500, 900))","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-index-method","kind":"METHOD","parentKey":"class-tuple","name":"index_method","signature":"tuple.index(value, start=0, stop=len(tuple), /)","description":"Return the first matching position within the selected bounds, or raise ValueError if the value is absent.","behavior":"Return the first matching position within the selected bounds, or raise ValueError if the value is absent.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value that must exist in the tuple.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int","defaultValue":"0","description":"First position to search, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int","defaultValue":"len(tuple)","description":"Stop searching before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"First matching item index.","example":"pair = (\"farm\", \"pvp\")\nindex = pair.index(\"pvp\")","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-count-method","kind":"METHOD","parentKey":"class-tuple","name":"count_method","signature":"tuple.count(value, /)","description":"Count matching tuple items.","behavior":"Count matching tuple items.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of matches.","example":"pair = (\"farm\", \"farm\", \"pvp\")\ncount = pair.count(\"farm\")","aliases":[],"group":"FLOW"},{"key":"class-tuple-method-for-loop","kind":"METHOD","parentKey":"class-tuple","name":"for_loop","signature":"for item in tuple:","description":"Iterate tuple items from left to right.","behavior":"Iterate tuple items from left to right.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"item","type":"Any","defaultValue":null,"description":"Current tuple item in loop.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"tuple","type":"tuple","defaultValue":null,"description":"tuple to iterate.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No direct return value.","example":"offset = (0, 1)\nfor item in offset:\n    text(str(item))","aliases":[],"group":"FLOW"},{"key":"class-motiontracker","kind":"CLASS","parentKey":null,"name":"MotionTracker","signature":"MotionTracker(region=None, exclude=None, max_displacement=80, max_gap_ms=850, max_frame_age_ms=250)","description":"Track background translation between screen frames using native OpenCV multi-patch matching. Construction does not capture a frame; at most 16 trackers may be open per flow. This does not detect a player or locate an atlas. Exclude the HUD and character; handle game zoom externally with template matching and scale. Suspected zoom or rotation produces LOST, not a zoom estimate.","behavior":"Track background translation between screen frames using native OpenCV multi-patch matching. Construction does not capture a frame; at most 16 trackers may be open per flow. This does not detect a player or locate an atlas. Exclude the HUD and character; handle game zoom externally with template matching and scale. Suspected zoom or rotation produces LOST, not a zoom estimate.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[{"name":"region","type":"Region | None","defaultValue":"None","description":"Tracking rectangle in screen pixels, entirely inside the current screen, with finite positive width and height. None selects the full screen. Its coordinates are frozen when constructed. A very small or narrow region raises an error; choose a larger region.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"exclude","type":"list | tuple | None","defaultValue":"None","description":"Up to 32 Regions to exclude, clipped to the tracking rectangle. Each has finite positive width and height; coordinates are frozen when constructed. None excludes nothing.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max_displacement","type":"Number (1..256)","defaultValue":"80","description":"Maximum finite displacement per axis in screen pixels; default 80.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max_gap_ms","type":"Number (1..5000)","defaultValue":"850","description":"Maximum whole-number gap between frames in milliseconds; default 850.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max_frame_age_ms","type":"Number (1..5000)","defaultValue":"250","description":"Maximum whole-number frame age in milliseconds; default 250.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Track background motion between captured frames\ntracker = MotionTracker()\nfirst = tracker.update()\nwait(100)\nresult = tracker.update()\nif result.status == \"TRACKED\":\n    print(result.dx, result.dy)\ntracker.close()","aliases":[],"group":null},{"key":"class-motiontracker-method-update","kind":"METHOD","parentKey":"class-motiontracker","name":"update","signature":"tracker.update()","description":"Read the current captured frame and return its motion result. Screen capture must already have explicit consent and be ready. INITIALIZED establishes a baseline; TRACKED reports accepted translation. STALE means a duplicate, future or already too old frame before processing and leaves the baseline unchanged. LOST clears continuity so the next fresh valid frame initializes again. If a frame becomes too old during processing or Pause occurs before handoff, LOST has reason processing_frame_too_old. Raises an error after close.","behavior":"Read the current captured frame and return its motion result. Screen capture must already have explicit consent and be ready. INITIALIZED establishes a baseline; TRACKED reports accepted translation. STALE means a duplicate, future or already too old frame before processing and leaves the baseline unchanged. LOST clears continuity so the next fresh valid frame initializes again. If a frame becomes too old during processing or Pause occurs before handoff, LOST has reason processing_frame_too_old. Raises an error after close.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"MotionResult","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-motiontracker-method-reset","kind":"METHOD","parentKey":"class-motiontracker","name":"reset","signature":"tracker.reset()","description":"Clear the baseline while keeping the tracker usable. Raises an error after close.","behavior":"Clear the baseline while keeping the tracker usable. Raises an error after close.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-motiontracker-method-close","kind":"METHOD","parentKey":"class-motiontracker","name":"close","signature":"tracker.close()","description":"Release the tracker; repeated calls are safe. Handles are also released when the macro or flow ends, stops or fails. A handle can be reused across actions in the same executor and is isolated from other flows.","behavior":"Release the tracker; repeated calls are safe. Handles are also released when the macro or flow ends, stops or fails. A handle can be reused across actions in the same executor and is isolated from other flows.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-motionresult","kind":"READ_ONLY_CLASS","parentKey":null,"name":"MotionResult","signature":"MotionResult","description":"Read-only result from MotionTracker.update(). Translation describes background motion between frames, not absolute location. Tracking does not click, send input, upload or save data.","behavior":"Read-only result from MotionTracker.update(). Translation describes background motion between frames, not absolute location. Tracking does not click, send input, upload or save data.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":["status","dx","dy","frame_id","captured_at_ms","dt_ms","age_ms","inliers","residual_px","reason"],"fieldDocs":[{"name":"status","type":"String","defaultValue":null,"description":"INITIALIZED establishes a baseline; TRACKED has accepted translation; STALE means a duplicate, future or already too old frame before processing; LOST means a gap, geometry change, out-of-order frame, insufficient texture, ambiguity or a frame that became too old during processing.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"dx","type":"Number | None","defaultValue":null,"description":"Horizontal background translation in full-resolution screen pixels, only for TRACKED; motion left is negative.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"dy","type":"Number | None","defaultValue":null,"description":"Vertical background translation in full-resolution screen pixels, only for TRACKED.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"frame_id","type":"Number","defaultValue":null,"description":"Unique frame identity, unchanged when the same cached frame is read again.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"captured_at_ms","type":"Number","defaultValue":null,"description":"Android monotonic frame acquisition time in milliseconds, not presentation time.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"dt_ms","type":"Number | None","defaultValue":null,"description":"Elapsed milliseconds since the baseline, when available.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"age_ms","type":"Number","defaultValue":null,"description":"Final age of the frame in milliseconds.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"inliers","type":"Number","defaultValue":null,"description":"Number of patches supporting the accepted motion.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"residual_px","type":"Number | None","defaultValue":null,"description":"Motion residual in screen pixels, when available.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"reason","type":"String","defaultValue":null,"description":"Reason for the result status.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":null,"aliases":[],"group":null},{"key":"class-range","kind":"COLLECTION","parentKey":null,"name":"range","signature":"range(stop, /) | range(start, stop, step=1, /)","description":"An immutable sequence of integers created with range(). You can reuse it without creating a full list; use list() when you need a list.","behavior":"An immutable sequence of integers created with range(). You can reuse it without creating a full list; use list() when you need a list.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["start","stop","step"],"fieldDocs":[{"name":"start","type":"Int","defaultValue":null,"description":"Inclusive starting boundary.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"stop","type":"Int","defaultValue":null,"description":"End boundary, excluded from the sequence.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"step","type":"Int","defaultValue":null,"description":"Difference between consecutive values.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"start","type":"Int","defaultValue":"0","description":"Start value (inclusive)","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"stop","type":"Int","defaultValue":null,"description":"End value (exclusive)","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"step","type":"Int","defaultValue":"1","description":"Difference between consecutive values. Use a negative value to count down; 0 raises an error.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"fieldExample":"numbers = range(2, 10, 2)\ntext(str(numbers.start))","constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"numbers = range(0, 10, 2)\ntext(str(list(numbers)))\ntext(str(numbers.index(4)))","aliases":[],"group":null},{"key":"class-range-method-count","kind":"METHOD","parentKey":"class-range","name":"count","signature":"range.count(value, /)","description":"Return how many times value appears: 0 or 1.","behavior":"Return how many times value appears: 0 or 1.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to look for. Numeric values are compared by value, so 1.0 equals 1.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":null,"example":"range(0, 10, 2).count(4)","aliases":[],"group":"FLOW"},{"key":"class-range-method-index","kind":"METHOD","parentKey":"class-range","name":"index","signature":"range.index(value, /)","description":"Return the first index of value. Raises ValueError if it is absent.","behavior":"Return the first index of value. Raises ValueError if it is absent.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to look for. Numeric values are compared by value, so 1.0 equals 1.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":null,"example":"range(0, 10, 2).index(4)","aliases":[],"group":"FLOW"},{"key":"class-set","kind":"COLLECTION","parentKey":null,"name":"set","signature":"set(iterable=(), /)","description":"Store values without duplicates and add or remove them later. Equal values appear only once: True, 1 and 1.0 are equal. Items must be usable as dictionary keys; a list, dictionary, set or tuple containing one of them is rejected. Do not rely on iteration order.","behavior":"Store values without duplicates and add or remove them later. Equal values appear only once: True, 1 and 1.0 are equal. Items must be usable as dictionary keys; a list, dictionary, set or tuple containing one of them is rejected. Do not rely on iteration order.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"seen = {1, 2, 2}\nseen.add(3)\n\nif 2 in seen:\n    text(str(seen))","aliases":[],"group":null},{"key":"class-set-creation-method-constructor","kind":"CREATION_METHOD","parentKey":"class-set","name":"constructor","signature":"set()\nset(iterable, /)","description":"Create an empty set or collect values from a source you can loop through, such as a list or generator, keeping only the first occurrence of each equal value.","behavior":"Create an empty set or collect values from a source you can loop through, such as a list or generator, keeping only the first occurrence of each equal value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":"()","description":"Optional source values to deduplicate into the new set.","suggestAsNamedArg":true,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"set","returnDescription":"A new mutable set.","example":"seen = set()\nunique = set([1, 2, 2, 3])","aliases":[],"group":"FLOW"},{"key":"class-set-creation-method-literal","kind":"CREATION_METHOD","parentKey":"class-set","name":"literal","signature":"{1, 2, 3}","description":"Create a set by writing values between braces. Use set() for an empty set; {} creates an empty dictionary.","behavior":"Create a set by writing values between braces. Use set() for an empty set; {} creates an empty dictionary.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Each value written inside the braces.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"set","returnDescription":"A new mutable set that keeps one copy of each value.","example":"unique = {1, 2, 2, 3}\ntext(str(unique))        # returns {1, 2, 3}","aliases":[],"group":"FLOW"},{"key":"class-set-creation-method-comprehension","kind":"CREATION_METHOD","parentKey":"class-set","name":"comprehension","signature":"{expr for target in iterable if condition}","description":"Build a set from values produced by expr while looping through a source, removing duplicates. Use if to filter items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","behavior":"Build a set from values produced by expr while looping through a source, removing duplicates. Use if to filter items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"expr","type":"Any?","defaultValue":null,"description":"Value calculated for each accepted item.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Variable or group of variables receiving the current item. A target such as *rest is not supported.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source you can loop through, such as a string, collection or generator; a dictionary yields its keys.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before adding a value.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"set","returnDescription":"A new mutable set.","example":"values = [1, 2, 3, 4, 5]\nremainders = {x % 3 for x in values}","aliases":[],"group":"FLOW"},{"key":"class-set-method-length","kind":"METHOD","parentKey":"class-set","name":"length","signature":"len(set, /)","description":"Count how many unique values are in the set.","behavior":"Count how many unique values are in the set.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"set","type":"set","defaultValue":null,"description":"The set to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of set values.","example":"values = {1, 2, 2}\ncount = len(values)      # returns 2","aliases":[],"group":"FLOW"},{"key":"class-set-method-membership-operator","kind":"METHOD","parentKey":"class-set","name":"membership_operator","signature":"value in set","description":"Check whether a value exists in the set.","behavior":"Check whether a value exists in the set.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to test.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"set","type":"set","defaultValue":null,"description":"Set to search for the value.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"true when the value exists, otherwise false.","example":"values = {1, 2, 3}\nif 2 in values:\n    text(\"ready\")","aliases":[],"group":"FLOW"},{"key":"class-set-method-add-method","kind":"METHOD","parentKey":"class-set","name":"add_method","signature":"set.add(value, /)","description":"Add one value to the set. Existing values are kept once.","behavior":"Add one value to the set. Existing values are kept once.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to add.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The set is updated in place.","example":"seen = set()\nseen.add(\"home\")","aliases":[],"group":"FLOW"},{"key":"class-set-method-discard-method","kind":"METHOD","parentKey":"class-set","name":"discard_method","signature":"set.discard(value, /)","description":"Remove a value if it exists. Missing values are ignored.","behavior":"Remove a value if it exists. Missing values are ignored.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to remove if present.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The set may be updated in place.","example":"seen = {\"home\", \"shop\"}\nseen.discard(\"shop\")","aliases":[],"group":"FLOW"},{"key":"class-set-method-remove-method","kind":"METHOD","parentKey":"class-set","name":"remove_method","signature":"set.remove(value, /)","description":"Remove a value from this set, or raise KeyError if it is absent.","behavior":"Remove a value from this set, or raise KeyError if it is absent.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value that must exist in the set.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The set is updated in place.","example":"seen = {\"home\", \"shop\"}\nseen.remove(\"home\")","aliases":[],"group":"FLOW"},{"key":"class-set-method-pop-method","kind":"METHOD","parentKey":"class-set","name":"pop_method","signature":"set.pop()","description":"Remove and return an arbitrary value from this set. An empty set raises KeyError.","behavior":"Remove and return an arbitrary value from this set. An empty set raises KeyError.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Any?","returnDescription":"Removed value.","example":"seen = {\"home\", \"shop\"}\nvalue = seen.pop()","aliases":[],"group":"FLOW"},{"key":"class-set-method-update-method","kind":"METHOD","parentKey":"class-set","name":"update_method","signature":"set.update(*iterables)","description":"Add values from sources you can loop through to this set, keeping each equal value only once.","behavior":"Add values from sources you can loop through to this set, keeping each equal value only once.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to add.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"}],"returnType":"None","returnDescription":"No direct return value. The set is updated in place.","example":"seen = {\"home\"}\nseen.update([\"shop\", \"home\"])","aliases":[],"group":"FLOW"},{"key":"class-set-method-union-method","kind":"METHOD","parentKey":"class-set","name":"union_method","signature":"set.union(*iterables)","description":"Return a new set combining this set with sources you can loop through, without duplicates. This set is unchanged.","behavior":"Return a new set combining this set with sources you can loop through, without duplicates. This set is unchanged.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to merge.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"}],"returnType":"set","returnDescription":"Merged set copy.","example":"a = {\"home\"}\nb = a.union([\"shop\"])","aliases":[],"group":"FLOW"},{"key":"class-set-method-intersection-method","kind":"METHOD","parentKey":"class-set","name":"intersection_method","signature":"set.intersection(*iterables)","description":"Return a new set containing values from this set that appear in every supplied source. With no sources, return a copy. This set is unchanged.","behavior":"Return a new set containing values from this set that appear in every supplied source. With no sources, return a copy. This set is unchanged.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to compare.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"}],"returnType":"set","returnDescription":"Intersection set copy.","example":"a = {\"home\", \"shop\"}\nb = a.intersection([\"shop\"])","aliases":[],"group":"FLOW"},{"key":"class-set-method-difference-method","kind":"METHOD","parentKey":"class-set","name":"difference_method","signature":"set.difference(*iterables)","description":"Return a new set containing values from this set that are absent from all supplied sources. With no sources, return a copy. This set is unchanged.","behavior":"Return a new set containing values from this set that are absent from all supplied sources. With no sources, return a copy. This set is unchanged.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to subtract.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"}],"returnType":"set","returnDescription":"Difference set copy.","example":"a = {\"home\", \"shop\"}\nb = a.difference([\"home\"])","aliases":[],"group":"FLOW"},{"key":"class-set-method-copy-method","kind":"METHOD","parentKey":"class-set","name":"copy_method","signature":"set.copy()","description":"Return a new set with the same values. Adding or removing values in the copy does not change the original.","behavior":"Return a new set with the same values. Adding or removing values in the copy does not change the original.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"set","returnDescription":"A new set with the same values.","example":"seen = {1, 2}\ncopied = seen.copy()","aliases":[],"group":"FLOW"},{"key":"class-set-method-clear-method","kind":"METHOD","parentKey":"class-set","name":"clear_method","signature":"set.clear()","description":"Remove every value from the set.","behavior":"Remove every value from the set.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No direct return value. The set becomes empty.","example":"seen = {1, 2}\nseen.clear()","aliases":[],"group":"FLOW"},{"key":"class-set-method-for-loop","kind":"METHOD","parentKey":"class-set","name":"for_loop","signature":"for value in set:","description":"Loop through each value once. Do not rely on a particular order.","behavior":"Loop through each value once. Do not rely on a particular order.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Current set value in the loop.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"set","type":"set","defaultValue":null,"description":"set to iterate.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No direct return value. The loop runs once per value.","example":"values = {\"home\", \"shop\"}\nfor value in values:\n    text(value)","aliases":[],"group":"FLOW"},{"key":"class-set-method-truthy-check","kind":"METHOD","parentKey":"class-set","name":"truthy_check","signature":"if set | if not set","description":"Check whether the set has at least one value. An empty set is treated as false.","behavior":"Check whether the set has at least one value. An empty set is treated as false.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"set","type":"set","defaultValue":null,"description":"The set used in the condition.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean condition","returnDescription":"true when the set is not empty, false when it is empty.","example":"seen = set()\nif not seen:\n    text(\"empty\")","aliases":[],"group":"FLOW"},{"key":"class-dict","kind":"COLLECTION","parentKey":null,"name":"dict","signature":"dict(mapping_or_pairs=(), /, **items)","description":"Store values under keys and read them by key. Keys keep insertion order; writing an existing key replaces its value without moving the key. Each key has one value.","behavior":"Store values under keys and read them by key. Keys keep insertion order; writing an existing key replaces its value without moving the key. Each key has one value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"settings = dict(mode=\"farm\", retries=3)\nmode = settings.get(\"mode\")   # returns farm\nkeys = settings.keys()\n\nfor key in settings:\n    text(str(settings[key]))   # returns None","aliases":[],"group":null},{"key":"class-dict-creation-method-constructor","kind":"CREATION_METHOD","parentKey":"class-dict","name":"constructor","signature":"dict()\ndict(mapping_or_pairs, /)\ndict(key=value, ...)","description":"Create an empty dictionary or copy another dictionary or a source of (key, value) pairs. Named arguments add entries afterward and replace matching keys. Nested values are shared with the source.","behavior":"Create an empty dictionary or copy another dictionary or a source of (key, value) pairs. Named arguments add entries afterward and replace matching keys. Nested values are shared with the source.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"mapping_or_pairs","type":"dict | Iterable","defaultValue":"()","description":"A dict or a source you can loop through; each item must be a list or tuple with exactly two items: key and value.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"key=value","type":"Any?","defaultValue":null,"description":"Entries written as key=value, added after the source; matching keys are replaced.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"variadic"}],"returnType":"dict","returnDescription":"A new mutable dictionary.","example":"settings = dict(mode=\"farm\", retries=3)\ncopied = dict(settings)\nfrom_pairs = dict([(\"mode\", \"pvp\")])","aliases":[],"group":"FLOW"},{"key":"class-dict-creation-method-literal","kind":"CREATION_METHOD","parentKey":"class-dict","name":"literal","signature":"{\"mode\": \"farm\", \"retries\": 3}","description":"Create a dictionary by writing key: value pairs between braces. Repeated keys keep the last value.","behavior":"Create a dictionary by writing key: value pairs between braces. Repeated keys keep the last value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key identifying the value. Numbers, strings and tuples of valid keys are allowed; lists, dictionaries and sets are not. True, 1 and 1.0 identify the same key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"dict","returnDescription":"A new dictionary that preserves the literal entry order.","example":"settings = {\n    \"mode\": \"farm\",\n    \"retries\": 3,\n    \"enabled\": True\n}","aliases":[],"group":"FLOW"},{"key":"class-dict-creation-method-comprehension","kind":"CREATION_METHOD","parentKey":"class-dict","name":"comprehension","signature":"{key: value for target in iterable if condition}","description":"Build a dictionary from key: value pairs calculated while looping through a source. Repeated keys replace earlier values. Use if to filter items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","behavior":"Build a dictionary from key: value pairs calculated while looping through a source. Repeated keys replace earlier values. Use if to filter items; multiple for/if clauses are allowed. Loop variables stay inside this expression.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"dict key calculated for each accepted item.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Variable or group of variables receiving the current item. A target such as *rest is not supported.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source you can loop through, such as a string, collection or generator; a dictionary yields its keys.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before storing an entry.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"dict","returnDescription":"A new mutable dictionary.","example":"pairs = [(\"mode\", \"farm\"), (\"retries\", 3)]\nsettings = {key: value for key, value in pairs}","aliases":[],"group":"FLOW"},{"key":"class-dict-method-key-access","kind":"METHOD","parentKey":"class-dict","name":"key_access","signature":"dictionary[\"key\"]","description":"Read the value stored under key. A missing key raises KeyError; use get() to supply a default instead.","behavior":"Read the value stored under key. A missing key raises KeyError; use get() to supply a default instead.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The source dictionary.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Any?","returnDescription":"The stored value, which may be None. A missing key raises KeyError.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nmode = settings[\"mode\"]        # returns farm\nmissing = settings.get(\"unknown\")  # returns None","aliases":[],"group":"FLOW"},{"key":"class-dict-method-key-assignment","kind":"METHOD","parentKey":"class-dict","name":"key_assignment","signature":"dictionary[key] = value","description":"Write or replace one key/value entry with bracket assignment syntax.","behavior":"Write or replace one key/value entry with bracket assignment syntax.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The mutable dictionary to update.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"key","type":"Any","defaultValue":null,"description":"Key to write or replace.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to store for that key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No direct return value. The dictionary is updated in place.","example":"settings = {\"mode\": \"farm\"}\nsettings[\"mode\"] = \"pvp\"","aliases":[],"group":"FLOW"},{"key":"class-dict-method-length","kind":"METHOD","parentKey":"class-dict","name":"length","signature":"len(dictionary, /)","description":"Count how many key/value pairs are in the dictionary.","behavior":"Count how many key/value pairs are in the dictionary.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of entries in the dictionary.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\ncount = len(settings)          # returns 2","aliases":[],"group":"FLOW"},{"key":"class-dict-method-get-method","kind":"METHOD","parentKey":"class-dict","name":"get_method","signature":"dictionary.get(key, default=None, /)","description":"Read a value by key and optionally fall back to a default.","behavior":"Read a value by key and optionally fall back to a default.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback value returned when the key is missing.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"The stored value for that key, or the provided default.","example":"settings = {\"mode\": \"farm\"}\nmode = settings.get(\"mode\")           # returns farm\nretry = settings.get(\"retries\", 0)    # returns 0","aliases":[],"group":"FLOW"},{"key":"class-dict-method-items-method","kind":"METHOD","parentKey":"class-dict","name":"items_method","signature":"dictionary.items()","description":"Return a live view of (key, value) tuples in insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","behavior":"Return a live view of (key, value) tuples in insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict_items","returnDescription":"A dict_items view; it cannot be indexed directly.","example":"settings = {\"mode\": \"farm\"}\npairs = settings.items()","aliases":[],"group":"FLOW"},{"key":"class-dict-method-pop-method","kind":"METHOD","parentKey":"class-dict","name":"pop_method","signature":"dictionary.pop(key, /)\ndictionary.pop(key, default, /)","description":"Remove a key and return its value. If the key is absent, return an explicitly supplied default, including None; omitting default raises KeyError.","behavior":"Remove a key and return its value. If the key is absent, return an explicitly supplied default, including None; omitting default raises KeyError.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to remove.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"default","type":"Any?","defaultValue":null,"description":"Value returned for a missing key only when this argument is supplied. Omitting it raises KeyError for a missing key.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"Removed value, or the explicitly supplied default when the key is absent.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nremoved = settings.pop(\"retries\")","aliases":[],"group":"FLOW"},{"key":"class-dict-method-copy-method","kind":"METHOD","parentKey":"class-dict","name":"copy_method","signature":"dictionary.copy()","description":"Return a new dictionary with the same entries. Adding, removing or replacing entries does not change the original; nested collections are still shared.","behavior":"Return a new dictionary with the same entries. Adding, removing or replacing entries does not change the original; nested collections are still shared.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"A new dict; nested collections are not copied.","example":"settings = {\"mode\": \"farm\"}\ncopied = settings.copy()","aliases":[],"group":"FLOW"},{"key":"class-dict-method-update-method","kind":"METHOD","parentKey":"class-dict","name":"update_method","signature":"dictionary.update(other=(), /, **items)","description":"Add entries to this dictionary from another dictionary or a source of (key, value) pairs, then apply named arguments. Matching keys are replaced without changing their position.","behavior":"Add entries to this dictionary from another dictionary or a source of (key, value) pairs, then apply named arguments. Matching keys are replaced without changing their position.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"dict | Iterable","defaultValue":"()","description":"A dict or a source of two-item lists or tuples containing a key and value.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"items","type":"Any?","defaultValue":null,"description":"Entries written as key=value; these replace matching entries from other.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"}],"returnType":"None","returnDescription":"No direct return value. The dictionary is updated in place.","example":"settings = {\"mode\": \"farm\"}\nsettings.update([(\"retries\", 3)], mode=\"pvp\")","aliases":[],"group":"FLOW"},{"key":"class-dict-method-setdefault-method","kind":"METHOD","parentKey":"class-dict","name":"setdefault_method","signature":"dictionary.setdefault(key, default=None, /)","description":"Return an existing value, or store and return the default when the key is missing.","behavior":"Return an existing value, or store and return the default when the key is missing.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to read or create.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"default","type":"Any?","defaultValue":"None","description":"Value stored when the key is absent.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Any?","returnDescription":"Existing value or inserted default.","example":"settings = dict()\nmode = settings.setdefault(\"mode\", \"farm\")","aliases":[],"group":"FLOW"},{"key":"class-dict-method-keys-method","kind":"METHOD","parentKey":"class-dict","name":"keys_method","signature":"dictionary.keys()","description":"Return a live view of keys in insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","behavior":"Return a live view of keys in insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict_keys","returnDescription":"A dict_keys view; it cannot be indexed directly.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nkeys = settings.keys()\nfirst_key = list(keys)[0]                 # returns mode","aliases":[],"group":"FLOW"},{"key":"class-dict-method-values-method","kind":"METHOD","parentKey":"class-dict","name":"values_method","signature":"dictionary.values()","description":"Return a live view of values in key insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","behavior":"Return a live view of values in key insertion order. It reflects later dictionary changes. Loop over it or convert with list() to use indexes.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict_values","returnDescription":"A dict_values view; it cannot be indexed directly.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nvalues = settings.values()\nlast_value = list(values)[-1]             # returns 3","aliases":[],"group":"FLOW"},{"key":"class-dict-method-clear-method","kind":"METHOD","parentKey":"class-dict","name":"clear_method","signature":"dictionary.clear()","description":"Remove every key/value pair from the dictionary.","behavior":"Remove every key/value pair from the dictionary.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No direct return value. The dictionary becomes empty.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nsettings.clear()\ntext(str(len(settings)))   # returns 0","aliases":[],"group":"FLOW"},{"key":"class-dict-method-for-loop","kind":"METHOD","parentKey":"class-dict","name":"for_loop","signature":"for key in dictionary:","description":"Loop through dictionary keys in insertion order, including keys added after creation.","behavior":"Loop through dictionary keys in insertion order, including keys added after creation.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Current key inside the loop.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to iterate.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No direct return value. The loop runs once per key.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nfor key in settings:\n    text(str(settings[key]))   # returns None","aliases":[],"group":"FLOW"},{"key":"class-dict-method-truthy-check","kind":"METHOD","parentKey":"class-dict","name":"truthy_check","signature":"if dictionary | if not dictionary","description":"Check whether the dictionary has at least one entry. An empty dictionary is treated as false.","behavior":"Check whether the dictionary has at least one entry. An empty dictionary is treated as false.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary used in the condition.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean condition","returnDescription":"true when the dictionary is not empty, false when it is empty.","example":"settings = {}\nif not settings:\n    text(\"No settings\")       # returns None","aliases":[],"group":"FLOW"},{"key":"class-string","kind":"COLLECTION","parentKey":null,"name":"String","signature":"String","description":"Store text written in quotes or converted with str(value). Strings cannot be changed in place; string methods return new values. Positions and length count Unicode code points: an emoji is one position, but a letter with a separate accent or a joined emoji can use several.","behavior":"Store text written in quotes or converted with str(value). Strings cannot be changed in place; string methods return new values. Positions and length count Unicode code points: an emoji is one position, but a letter with a separate accent or a joined emoji can use several.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":false,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"name = \"Start\"\nif name:\n    first_char = name[0]\n    text(first_char)","aliases":[],"group":null},{"key":"class-string-creation-method-literal","kind":"CREATION_METHOD","parentKey":"class-string","name":"literal","signature":"\"hello\"","description":"Create text directly with single or double quotes.","behavior":"Create text directly with single or double quotes.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"text","type":"String","defaultValue":null,"description":"String content between quotes.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"String","returnDescription":"A new string value.","example":"label = \"Start\"\ntext(label)","aliases":[],"group":"FLOW"},{"key":"class-string-creation-method-cast","kind":"CREATION_METHOD","parentKey":"class-string","name":"cast","signature":"str(value, /)","description":"Convert a value to text. Large collections or deeply nested values are shortened with markers showing omitted content; a string passed directly is unchanged.","behavior":"Convert a value to text. Large collections or deeply nested values are shortened with markers showing omitted content; a string passed directly is unchanged.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to convert into text.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Converted text value.","example":"attempt = 3\nline = str(attempt)","aliases":[],"group":"FLOW"},{"key":"class-string-method-length","kind":"METHOD","parentKey":"class-string","name":"length","signature":"len(string, /)","description":"Count how many characters are in the string.","behavior":"Count how many characters are in the string.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"string","type":"String","defaultValue":null,"description":"String value to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Character count.","example":"label = \"Play\"\ncount = len(label)        # returns 4","aliases":[],"group":"FLOW"},{"key":"class-string-method-index-access","kind":"METHOD","parentKey":"class-string","name":"index_access","signature":"string[index]","description":"Read one character by position, starting at 0. Negative indexes count from the end: -1 is the last position.","behavior":"Read one character by position, starting at 0. Negative indexes count from the end: -1 is the last position.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"string","type":"String","defaultValue":null,"description":"Source string.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"index","type":"Int","defaultValue":null,"description":"Character position: 0 is first, -1 is last.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-only"}],"returnType":"String","returnDescription":"One-character string. Raises IndexError when the position is outside the string.","example":"label = \"Play\"\nfirst = label[0]          # returns 'P'\nlast = label[-1]          # returns 'y'","aliases":[],"group":"FLOW"},{"key":"class-string-method-slice","kind":"METHOD","parentKey":"class-string","name":"slice","signature":"string[start:end[:step]]","description":"Return a new string from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole string in the step direction.","behavior":"Return a new string from start up to, but not including, end. Negative indexes count from the end. Omitted bounds select the whole string in the step direction.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Int?","defaultValue":"start of string","description":"First character index to include.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"end","type":"Int","defaultValue":"end of string","description":"Stop before this character index.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between characters. Cannot be 0; negative values read backward.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-only"}],"returnType":"String","returnDescription":"A new string slice, clamped to the available range.","example":"label = \"abcdef\"\nmiddle = label[1:4]       # returns 'bcd'\ntail = label[-3:]         # returns 'def'\nreverse = label[::-1]     # returns 'fedcba'","aliases":[],"group":"FLOW"},{"key":"class-string-method-lower-method","kind":"METHOD","parentKey":"class-string","name":"lower_method","signature":"string.lower()","description":"Return a lowercase copy of the string.","behavior":"Return a lowercase copy of the string.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"Lowercase string.","example":"label = \"PLAY\"\ntext(label.lower())","aliases":[],"group":"FLOW"},{"key":"class-string-method-upper-method","kind":"METHOD","parentKey":"class-string","name":"upper_method","signature":"string.upper()","description":"Return an uppercase copy of the string.","behavior":"Return an uppercase copy of the string.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"Uppercase string.","example":"label = \"play\"\ntext(label.upper())","aliases":[],"group":"FLOW"},{"key":"class-string-method-strip-method","kind":"METHOD","parentKey":"class-string","name":"strip_method","signature":"string.strip(chars=None, /)","description":"Trim whitespace, or the provided characters, from both ends.","behavior":"Trim whitespace, or the provided characters, from both ends.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Remove any of these characters repeatedly at the selected ends, not the whole chars string as a prefix or suffix.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Trimmed string.","example":"label = \"  Play  \"\nclean = label.strip()","aliases":[],"group":"FLOW"},{"key":"class-string-method-lstrip-method","kind":"METHOD","parentKey":"class-string","name":"lstrip_method","signature":"string.lstrip(chars=None, /)","description":"Trim whitespace, or the provided characters, from the left side.","behavior":"Trim whitespace, or the provided characters, from the left side.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Remove any of these characters repeatedly at the selected ends, not the whole chars string as a prefix or suffix.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Left-trimmed string.","example":"label = \"...Play\"\nclean = label.lstrip(\".\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-rstrip-method","kind":"METHOD","parentKey":"class-string","name":"rstrip_method","signature":"string.rstrip(chars=None, /)","description":"Trim whitespace, or the provided characters, from the right side.","behavior":"Trim whitespace, or the provided characters, from the right side.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Remove any of these characters repeatedly at the selected ends, not the whole chars string as a prefix or suffix.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Right-trimmed string.","example":"label = \"Play...\"\nclean = label.rstrip(\".\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-startswith-method","kind":"METHOD","parentKey":"class-string","name":"startswith_method","signature":"string.startswith(prefix, start=0, stop=len(string), /)","description":"Check whether the selected part starts with prefix, with case preserved.","behavior":"Check whether the selected part starts with prefix, with case preserved.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"prefix","type":"String | tuple","defaultValue":null,"description":"Text, or a tuple of possible texts; True if any matches the beginning.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int?","defaultValue":"0","description":"First position to include, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int?","defaultValue":"len(string)","description":"Stop before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Boolean","returnDescription":"true when the prefix matches.","example":"label = \"Play\"\nready = label.startswith(\"Pl\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-endswith-method","kind":"METHOD","parentKey":"class-string","name":"endswith_method","signature":"string.endswith(suffix, start=0, stop=len(string), /)","description":"Check whether the selected part ends with suffix, with case preserved.","behavior":"Check whether the selected part ends with suffix, with case preserved.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"suffix","type":"String | tuple","defaultValue":null,"description":"Text, or a tuple of possible texts; True if any matches the end.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int?","defaultValue":"0","description":"First position to include, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int?","defaultValue":"len(string)","description":"Stop before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Boolean","returnDescription":"true when the suffix matches.","example":"label = \"Play\"\nready = label.endswith(\"ay\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-find-method","kind":"METHOD","parentKey":"class-string","name":"find_method","signature":"string.find(sub, start=0, stop=len(string), /)","description":"Find the first substring index, or return -1 when absent.","behavior":"Find the first substring index, or return -1 when absent.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Substring to find.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int?","defaultValue":"0","description":"First position to search, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int?","defaultValue":"len(string)","description":"Stop searching before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"First matching position in the original string, starting at 0, or -1 if absent.","example":"label = \"start button\"\nindex = label.find(\"button\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-index-method","kind":"METHOD","parentKey":"class-string","name":"index_method","signature":"string.index(sub, start=0, stop=len(string), /)","description":"Return the first matching position in the original string, or raise ValueError if sub is absent from the selected part.","behavior":"Return the first matching position in the original string, or raise ValueError if sub is absent from the selected part.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Substring that must exist.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int?","defaultValue":"0","description":"First position to search, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int?","defaultValue":"len(string)","description":"Stop searching before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"First matching index.","example":"label = \"start button\"\nindex = label.index(\"button\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-replace-method","kind":"METHOD","parentKey":"class-string","name":"replace_method","signature":"string.replace(old, new, /, count=-1)","description":"Return a copy with occurrences of old text replaced.","behavior":"Return a copy with occurrences of old text replaced.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"old","type":"String","defaultValue":null,"description":"Text to replace, without overlapping matches. An empty string inserts new at character boundaries, subject to count.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"new","type":"String","defaultValue":null,"description":"Replacement text.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"count","type":"Int","defaultValue":"-1","description":"Maximum replacements; negative means all.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"String","returnDescription":"Updated string copy.","example":"label = \"start start\"\nonce = label.replace(\"start\", \"play\", 1)","aliases":[],"group":"FLOW"},{"key":"class-string-method-split-method","kind":"METHOD","parentKey":"class-string","name":"split_method","signature":"string.split(sep=None, maxsplit=-1)","description":"Return a list of text parts split at sep. With sep=None, runs of whitespace form one separator and leading whitespace is skipped; after maxsplit splits, the rest is kept as one part.","behavior":"Return a list of text parts split at sep. With sep=None, runs of whitespace form one separator and leading whitespace is skipped; after maxsplit splits, the rest is kept as one part.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sep","type":"String?","defaultValue":"None","description":"Separator text; an empty separator raises ValueError. None splits on runs of whitespace instead.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"maxsplit","type":"Int","defaultValue":"-1","description":"Maximum split count; negative means all.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"list","returnDescription":"List of string parts.","example":"raw = \"a,b,c\"\nparts = raw.split(\",\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-join-method","kind":"METHOD","parentKey":"class-string","name":"join_method","signature":"string.join(iterable, /)","description":"Join strings from a source you can loop through, placing this string between them. An item that is not a string raises an error.","behavior":"Join strings from a source you can loop through, placing this string between them. An item that is not a string raises an error.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable<String>","defaultValue":null,"description":"String values to join.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Joined string.","example":"parts = [\"a\", \"b\", \"c\"]\nline = \",\".join(parts)","aliases":[],"group":"FLOW"},{"key":"class-string-method-count-method","kind":"METHOD","parentKey":"class-string","name":"count_method","signature":"string.count(sub, start=0, stop=len(string), /)","description":"Count non-overlapping substring occurrences.","behavior":"Count non-overlapping substring occurrences.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Text to count. An empty string matches each boundary, so the count is the selected part length plus 1.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Int?","defaultValue":"0","description":"First position to count from, starting at 0. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"},{"name":"stop","type":"Int?","defaultValue":"len(string)","description":"Stop counting before this position. Negative values count from the end; out-of-range bounds are limited to the available range.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Occurrence count.","example":"label = \"banana\"\ncount = label.count(\"an\")","aliases":[],"group":"FLOW"},{"key":"class-string-method-isalpha-method","kind":"METHOD","parentKey":"class-string","name":"isalpha_method","signature":"string.isalpha()","description":"Check whether the string is non-empty and all characters are letters.","behavior":"Check whether the string is non-empty and all characters are letters.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true for letters only.","example":"label = \"Play\"\nok = label.isalpha()","aliases":[],"group":"FLOW"},{"key":"class-string-method-isdigit-method","kind":"METHOD","parentKey":"class-string","name":"isdigit_method","signature":"string.isdigit()","description":"Check whether the string is non-empty and all characters are Unicode digits, including superscript and circled digits.","behavior":"Check whether the string is non-empty and all characters are Unicode digits, including superscript and circled digits.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true for digits only.","example":"value = \"123\"\nok = value.isdigit()","aliases":[],"group":"FLOW"},{"key":"class-string-method-isalnum-method","kind":"METHOD","parentKey":"class-string","name":"isalnum_method","signature":"string.isalnum()","description":"Check whether the string is non-empty and every character is a Unicode letter or numeric character, including fractions.","behavior":"Check whether the string is non-empty and every character is a Unicode letter or numeric character, including fractions.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"True for letters or numeric characters only; False for an empty string.","example":"value = \"A123\"\nok = value.isalnum()","aliases":[],"group":"FLOW"},{"key":"class-string-method-isspace-method","kind":"METHOD","parentKey":"class-string","name":"isspace_method","signature":"string.isspace()","description":"Check whether the string is non-empty and all characters are whitespace.","behavior":"Check whether the string is non-empty and all characters are whitespace.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true for whitespace only.","example":"value = \"   \"\nok = value.isspace()","aliases":[],"group":"FLOW"},{"key":"class-string-method-for-loop","kind":"METHOD","parentKey":"class-string","name":"for_loop","signature":"for ch in string:","description":"Iterate characters from left to right.","behavior":"Iterate characters from left to right.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"ch","type":"String","defaultValue":null,"description":"Current character in the loop.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"string","type":"String","defaultValue":null,"description":"String to iterate.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No direct return value. Executes once per character.","example":"word = \"Go\"\nfor ch in word:\n    text(ch)","aliases":[],"group":"FLOW"},{"key":"class-string-method-truthy-check","kind":"METHOD","parentKey":"class-string","name":"truthy_check","signature":"if string | if not string","description":"Check whether the string is empty or not.","behavior":"Check whether the string is empty or not.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"string","type":"String","defaultValue":null,"description":"String used in the condition.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean condition","returnDescription":"true when non-empty, false when empty.","example":"value = \"\"\nif not value:\n    text(\"empty\")","aliases":[],"group":"FLOW"},{"key":"class-macropanel","kind":"CLASS","parentKey":null,"name":"MacroPanel","signature":"MacroPanel(title=\"\", subtitle=\"\", confirm_text=\"Run\", cancel_text=\"Cancel\", *, version=\"\")","description":"Create a panel to collect macro settings from the user. Add fields, then call show() to display it.","behavior":"Create a panel to collect macro settings from the user. Add fields, then call show() to display it.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":true,"fields":["title","subtitle","version","confirm_text","cancel_text"],"fieldDocs":[{"name":"title","type":"String","defaultValue":"\"\"","description":"Panel title. Writable after construction.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"subtitle","type":"String","defaultValue":"\"\"","description":"Panel subtitle/helper text. Writable after construction.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"version","type":"String","defaultValue":"\"\"","description":"Optional version label kept for compatibility; MacroPanel input values are restored from and saved to Storage by variable name, not by version. Writable after construction.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"confirm_text","type":"String","defaultValue":"\"Run\"","description":"Confirm button label.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"cancel_text","type":"String","defaultValue":"\"Cancel\"","description":"Cancel button label.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[{"name":"title","type":"String","defaultValue":"\"\"","description":"Panel title.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"subtitle","type":"String","defaultValue":"\"\"","description":"Panel subtitle/helper text.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"confirm_text","type":"String","defaultValue":"\"Run\"","description":"Confirm button label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"cancel_text","type":"String","defaultValue":"\"Cancel\"","description":"Cancel button label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"version","type":"String","defaultValue":"\"\"","description":"Optional version label kept for compatibility; MacroPanel input values are restored from and saved to Storage by variable name, not by version.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"panel = MacroPanel(\"Run config\", \"Pick options before run\", confirm_text=\"Start\", cancel_text=\"Back\")\npanel.text(\"<b>Ready?</b>\")\npanel.checkbox(\"safe_mode\", \"Safe mode\", checked=True)\npanel.toggle_switch(\"retry\", \"Auto retry\", checked=False)\npanel.edit_text(\"username\", default=\"player01\", desc=\"Shown below the field\")\npanel.edit_text(\"runs\", \"Runs\", default=3, desc=\"Numbers only\", input_type=\"number\")\npanel.radio_group(\"mode\", [\"farm\", \"pvp\"], default=\"farm\")\npanel.radio_group(\"target\", [\"boss\", \"minion\"], default=\"boss\", dropdown=True)\npanel.slider(\"speed\", min=0, max=100, step=5, default=60)\npanel.stepper(\"retry_count\", min=0, max=10, step=1, default=2)\nvalues = panel.show()","aliases":[],"group":null},{"key":"class-macropanel-static-method-notify","kind":"STATIC_METHOD","parentKey":"class-macropanel","name":"notify","signature":"MacroPanel.notify(text)","description":"Show a message and wait for the user to confirm before continuing the script. Strings are shown as written; other values use the readable form of str(value), with nested data on multiple lines.","behavior":"Show a message and wait for the user to confirm before continuing the script. Strings are shown as written; other values use the readable form of str(value), with nested data on multiple lines.","execution":{"blocking":"yes","threadSafety":"serialized","parallel":"conditional","details":"Shows a message and waits for confirmation. Messages and dialog panels appear one at a time across all flows."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"text","type":"Any","defaultValue":null,"description":"Message text or structured value to display.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No return value after user confirmation.","example":"# Wait for the user to acknowledge this message\nMacroPanel.notify(\"Macro is ready\")","aliases":[],"group":"FLOW"},{"key":"class-macropanel-static-method-error","kind":"STATIC_METHOD","parentKey":"class-macropanel","name":"error","signature":"MacroPanel.error(text)","description":"Raise an error with this message and stop the script. During a macro run, the error display includes the flow and action path. Other values are converted to readable text as with str(value).","behavior":"Raise an error with this message and stop the script. During a macro run, the error display includes the flow and action path. Other values are converted to readable text as with str(value).","execution":{"blocking":"no","threadSafety":"serialized","parallel":"no","details":"Stops all flows with a script error, without waiting for confirmation."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"text","type":"Any","defaultValue":null,"description":"Error text or structured value to display.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"Does not return; raises a runtime error.","example":"# A failed precondition ends the entire Run\nif not TfliteModel.exists(\"enemy_detector\"):\n    MacroPanel.error(\"Import enemy_detector in Template Manager\")","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-edit-text","kind":"METHOD","parentKey":"class-macropanel","name":"edit_text","signature":"panel.edit_text(name, label=None, default=\"\", desc=None, input_type=\"text\")","description":"Add an editable field. Numeric input accepts finite signed decimal values, scientific notation and surrounding whitespace; blank, NaN, Infinity, overflow and hexadecimal are invalid. Invalid dialog input shows an error and blocks Run; an invalid floating draft shows an error and keeps the last valid value without saving the draft.","behavior":"Add an editable field. Numeric input accepts finite signed decimal values, scientific notation and surrounding whitespace; blank, NaN, Infinity, overflow and hexadecimal are invalid. Invalid dialog input shows an error and blocks Run; an invalid floating draft shows an error and keeps the last valid value without saving the draft.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"default","type":"String|Number","defaultValue":"\"\"","description":"Default value. A floating numeric field needs a valid initial value from default or Storage; otherwise show() raises an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"desc","type":"String?","defaultValue":"None","description":"Small helper text displayed below this field.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"input_type","type":"String","defaultValue":"\"text\"","description":"Use \"text\" for a String or \"number\" for a Number (float). Numeric strings previously saved in Storage can be restored.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.edit_text(\"player\", label=\"Player\", default=\"Guest\")\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-checkbox","kind":"METHOD","parentKey":"class-macropanel","name":"checkbox","signature":"panel.checkbox(name, label=None, checked=False)","description":"Add a box the user can check or uncheck.","behavior":"Add a box the user can check or uncheck.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default checked state.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.checkbox(\"sound\", label=\"Sound\", checked=True)\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-toggle-switch","kind":"METHOD","parentKey":"class-macropanel","name":"toggle_switch","signature":"panel.toggle_switch(name, label=None, checked=False)","description":"Add a switch the user can turn on or off.","behavior":"Add a switch the user can turn on or off.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default toggle state.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.toggle_switch(\"enabled\", label=\"Enabled\", checked=True)\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-radio-group","kind":"METHOD","parentKey":"class-macropanel","name":"radio_group","signature":"panel.radio_group(name, options, label=None, default=None, dropdown=False)","description":"Add a radio-group selector, or render it as a dropdown when dropdown=True.","behavior":"Add a radio-group selector, or render it as a dropdown when dropdown=True.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"options","type":"list[String]","defaultValue":null,"description":"Selectable options.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"default","type":"String|Int|None","defaultValue":"None","description":"Default option label or 0-based option index; None selects the first option.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"dropdown","type":"Boolean","defaultValue":"False","description":"Render this selector as a dropdown instead of radio options.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.radio_group(\"mode\", [\"slow\", \"fast\"], label=\"Mode\", default=\"slow\")\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-slider","kind":"METHOD","parentKey":"class-macropanel","name":"slider","signature":"panel.slider(name, min=0, max=100, step=1, label=None, default=None)","description":"Add a numeric slider.","behavior":"Add a numeric slider.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum value.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum value; must be at least min.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"step","type":"Number","defaultValue":"1","description":"Positive increment between slider values.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.slider(\"speed\", min=1, max=10, step=1, default=5)\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-stepper","kind":"METHOD","parentKey":"class-macropanel","name":"stepper","signature":"panel.stepper(name, min=0, max=100, step=1, label=None, default=None)","description":"Add a numeric stepper with +/- controls.","behavior":"Add a numeric stepper with +/- controls.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Non-empty key for this field in the returned dict and Storage. Each input in a panel must have a different key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum integer value.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum integer value; must be at least min.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"step","type":"Number","defaultValue":"1","description":"Positive integer increment for each + or - press. Numeric inputs are converted to integers.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.stepper(\"count\", min=1, max=20, step=1, default=3)\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-text","kind":"METHOD","parentKey":"class-macropanel","name":"text","signature":"panel.text(html)","description":"Add an HTML text block. Basic tags render inline, and CSS-styled fragments such as cards, colored sections, flex rows, gradients, and rounded boxes render in a locked-down WebView with JavaScript and external navigation disabled.","behavior":"Add an HTML text block. Basic tags render inline, and CSS-styled fragments such as cards, colored sections, flex rows, gradients, and rounded boxes render in a locked-down WebView with JavaScript and external navigation disabled.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"html","type":"String","defaultValue":null,"description":"HTML content to display.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"MacroPanel","returnDescription":"The same panel, so another panel method can be called on the result.","example":"# Build a panel and wait for user confirmation\npanel = MacroPanel(\"Settings\")\npanel.text(\"<b>Ready</b>\")\nresult = panel.show()\nprint(result)","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-show","kind":"METHOD","parentKey":"class-macropanel","name":"show","signature":"panel.show(*, mode=\"dialog\", anchor=\"top_left\", stop_button=True, width=None, height=None, collapsed=None, dock_position=None, pause_on_expand=True)","description":"Show the panel and return a dict of field names and values. Matching Storage entries supply the starting values; confirmed dialog values and valid floating-panel edits update Storage. Checkboxes and switches return Boolean, sliders and numeric fields Number, steppers Int, selectors Int indexes starting at 0, and text fields String. Reopening the same show() repeatedly without another runtime action stops the script to prevent an endless panel loop.","behavior":"Show the panel and return a dict of field names and values. Matching Storage entries supply the starting values; confirmed dialog values and valid floating-panel edits update Storage. Checkboxes and switches return Boolean, sliders and numeric fields Number, steppers Int, selectors Int indexes starting at 0, and text fields String. Reopening the same show() repeatedly without another runtime action stops the script to prevent an endless panel loop.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Dialog show() waits for the user. show(mode=\"floating\") continues without confirmation; use values() to read controls and close() to remove the panel."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"mode","type":"String","defaultValue":"\"dialog\"","description":"dialog waits for confirmation; Cancel returns an empty dict. floating returns immediately and stays until closed or the macro run ends. Showing another floating panel replaces the visible one.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"anchor","type":"String","defaultValue":"\"top_left\"","description":"Expanded floating panel placement: top_left, top_right, bottom_left, bottom_right, or free. free starts at top-left and allows dragging the expanded panel independently of the shared dock. Dragging the shared dock moves only the dock. Repeated show() preserves the current position.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"stop_button","type":"Boolean","defaultValue":"True","description":"Show the Stop button on the expanded floating panel. The collapsed panel has no separate Stop button; the main dock retains its normal Stop button in row mode.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"width","type":"Int?","defaultValue":"None","description":"Expanded floating window width in current-screen pixels; None uses the compact automatic size. Use a positive whole number. The overlay clamps the size to fit its header and available screen; collapsed panels stay compact. Point coordinate scaling does not apply.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"height","type":"Int?","defaultValue":"None","description":"Expanded floating window height in current-screen pixels; None sizes to content. Use a positive whole number. The overlay clamps the size to fit its header and available screen above the keyboard; collapsed panels stay compact. Point coordinate scaling does not apply.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"collapsed","type":"Boolean?","defaultValue":"None","description":"Floating mode only; a non-None value is rejected in dialog mode. True collapses the panel into an open button on the main dock; False expands it. None opens a new panel expanded and preserves the current state on repeated show(). Applies on the first display too. Repeat any custom anchor, width, or height in later show() calls to retain the expanded layout.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"dock_position","type":"Point | tuple[Number, Number] | list[Number] | None","defaultValue":"None","description":"Floating mode only; a non-None value is rejected in dialog mode. Set the shared main dock top-left position in current-screen pixels, including while the panel is expanded or before its first collapse. The dock moves with a 160 ms animation. Accepts Point(x, y) or a tuple/list of exactly two finite numbers from -2147483648 to 2147483647; Point scaling and anchors do not apply. The dock is clamped to the screen after measuring its actual size. None preserves its current placement. The expanded panel remains separate for every anchor, including free.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"pause_on_expand","type":"Boolean","defaultValue":"True","description":"Floating mode only; explicitly passing this argument in dialog mode raises an error. True pauses macro execution while the floating panel is expanded and visible. show() returns immediately; execution pauses at the next runtime checkpoint until the panel is collapsed, hidden, or closed. Use collapsed=True or pause_on_expand=False to continue the script while the panel is open. False disables this panel pause; manual pauses remain active. Each show() uses this call's value, defaulting to True again when omitted.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"dict","returnDescription":"dialog returns a separate dict. floating returns the same dict on repeated show(); valid user edits update its entries immediately. A value assigned separately, such as speed = config[\"speed\"], keeps the value read at that moment. values() returns a separate copy; close() keeps the final entries. Editing the returned dict in Python does not change the panel or Storage, and the next panel update replaces those edits.","example":"# Start collapsed, then expand, collapse, and move the dock\npanel = MacroPanel(\"Run config\")\npanel.show(mode=\"floating\", collapsed=True, dock_position=Point(20, 100))\nwait(1000)\npanel.show(mode=\"floating\", collapsed=False, pause_on_expand=False)\nwait(1000)\npanel.show(mode=\"floating\", collapsed=True, dock_position=(100, 200))","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-values","kind":"METHOD","parentKey":"class-macropanel","name":"values","signature":"panel.values()","description":"Copy the last valid field values after show(). Later panel edits do not change this copy. Valid floating-panel edits update Storage immediately; after close(), values() returns the last values. Calling before show() raises an error.","behavior":"Copy the last valid field values after show(). Later panel edits do not change this copy. Valid floating-panel edits update Storage immediately; after close(), values() returns the last values. Calling before show() raises an error.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"A separate dict of field names and values.","example":"# Read live settings from a compact window on each loop iteration\npanel = MacroPanel(\"Live controls\")\npanel.slider(\"speed\", min=1, max=10, default=5)\nconfig = panel.show(mode=\"floating\", anchor=\"free\", stop_button=True, width=320, height=240)\nfor index in range(10):\n    print(config[\"speed\"])\n    wait(1000)\nsnapshot = panel.values()\npanel.close()","aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-close","kind":"METHOD","parentKey":"class-macropanel","name":"close","signature":"panel.close()","description":"Close this floating panel and save its last valid values to Storage. This does not stop the macro. Repeated calls after show() are safe; values() still returns the last values. Calling before show() raises an error.","behavior":"Close this floating panel and save its last valid values to Storage. This does not stop the macro. Repeated calls after show() are safe; values() still returns the last values. Calling before show() raises an error.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Build each panel in one flow. Dialog prompts wait and appear one at a time; floating panels continue running. error() stops every flow."},"limitations":[],"relatedApis":["class-system-static-method-stop","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Read live settings from a compact window on each loop iteration\npanel = MacroPanel(\"Live controls\")\npanel.slider(\"speed\", min=1, max=10, default=5)\nconfig = panel.show(mode=\"floating\", anchor=\"free\", stop_button=True, width=320, height=240)\nfor index in range(10):\n    print(config[\"speed\"])\n    wait(1000)\nsnapshot = panel.values()\npanel.close()","aliases":[],"group":"FLOW"},{"key":"class-system","kind":"CLASS","parentKey":null,"name":"System","signature":"System()","description":"Access runtime system/device info and trigger system-level actions from script.","behavior":"Access runtime system/device info and trigger system-level actions from script.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":true,"fields":["dev","battery","screen","memory"],"fieldDocs":[{"name":"dev","type":"dict","defaultValue":null,"description":"Current device details: isEmulator, Android API level sdk, language code, darkmode, touch support, and capture readiness. Read again to get updated details.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"battery","type":"dict","defaultValue":null,"description":"Current battery details: percent from 0 to 100, charging, temperature in degrees Celsius, and health text. Unavailable percent or temperature is -1; unknown health is \"unknown\". Read again to update.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"screen","type":"dict","defaultValue":null,"description":"Current screen details: width and height in pixels, density scale, dpi, and orientation as display rotation in degrees (0, 90, 180, or 270). Read again after rotating the device.","suggestAsNamedArg":true,"requirement":null,"callingMode":null},{"name":"memory","type":"dict","defaultValue":null,"description":"Current system memory: avail, total, and the low-memory threshold in bytes; low indicates that available memory is low. Read again to update.","suggestAsNamedArg":true,"requirement":null,"callingMode":null}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"sys = System()\nprint(\"sdk=\", sys.sdk())\nbattery = System.battery()\nprint(\"battery=\", battery.percent, battery.charging)\nSystem.toast(\"Macro started\")\nSystem.play_noti()\nSystem.home()","aliases":[],"group":null},{"key":"class-system-static-method-time-ms","kind":"STATIC_METHOD","parentKey":"class-system","name":"time_ms","signature":"System.time_ms()","description":"Read the current date and time as milliseconds since 1970-01-01 00:00:00 UTC.","behavior":"Read the current date and time as milliseconds since 1970-01-01 00:00:00 UTC.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Milliseconds since 1970-01-01 00:00:00 UTC.","example":"# Query Android or request a documented system action\nstarted = System.time_ms()\nwait(100)\nprint(System.time_ms() - started)","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-app-version","kind":"STATIC_METHOD","parentKey":"class-system","name":"app_version","signature":"System.app_version()","description":"Read the installed CogniTab version name.","behavior":"Read the installed CogniTab version name.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"The CogniTab version name, or \"unknown\" if unavailable.","example":"# Query Android or request a documented system action\nprint(System.app_version())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-variant","kind":"STATIC_METHOD","parentKey":"class-system","name":"variant","signature":"System.variant()","description":"Get the stable code of the macro variant selected for this run.","behavior":"Get the stable code of the macro variant selected for this run.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"Variant code such as `default` or `pro_plus`.","example":"# Branch by the current macro variant\nif System.variant() == \"pro_plus\":\n    print(\"Pro Plus\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-open","kind":"STATIC_METHOD","parentKey":"class-system","name":"open","signature":"System.open(package_name)","description":"Open the launchable activity of an installed Android app. CogniTab resolves the standard or Android TV launcher activity from the package name, so the activity class is not required.","behavior":"Open the launchable activity of an installed Android app. CogniTab resolves the standard or Android TV launcher activity from the package name, so the activity class is not required.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"package_name","type":"String","defaultValue":null,"description":"Android application package name, for example `com.android.settings`.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"`True` when Android accepts a launch intent; `False` when the app is unavailable, has no launchable activity, or cannot be opened.","example":"# Open Android Settings and handle an unavailable target\nopened = System.open(\"com.android.settings\")\nif not opened:\n    System.toast(\"App is unavailable\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-sdk","kind":"STATIC_METHOD","parentKey":"class-system","name":"sdk","signature":"System.sdk()","description":"Read the Android API level used by this device.","behavior":"Read the Android API level used by this device.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Android API level as a number.","example":"# Query Android or request a documented system action\nprint(System.sdk())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-language","kind":"STATIC_METHOD","parentKey":"class-system","name":"language","signature":"System.language()","description":"Get current language code.","behavior":"Get current language code.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"Locale language code (for example `en`, `vi`).","example":"# Query Android or request a documented system action\nprint(System.language())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-dpi","kind":"STATIC_METHOD","parentKey":"class-system","name":"dpi","signature":"System.dpi()","description":"Get current screen DPI.","behavior":"Get current screen DPI.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Display density DPI.","example":"# Query Android or request a documented system action\nprint(System.dpi())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-darkmode","kind":"STATIC_METHOD","parentKey":"class-system","name":"darkmode","signature":"System.darkmode()","description":"Check if dark mode is enabled.","behavior":"Check if dark mode is enabled.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` when dark mode is active.","example":"# Query Android or request a documented system action\nif System.darkmode():\n    print(\"Dark mode\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-play-noti","kind":"STATIC_METHOD","parentKey":"class-system","name":"play_noti","signature":"System.play_noti()","description":"Play system notification sound.","behavior":"Play system notification sound.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Query Android or request a documented system action\nSystem.play_noti()","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-toast","kind":"STATIC_METHOD","parentKey":"class-system","name":"toast","signature":"System.toast(text)","description":"Show a brief Android message. Lists, dictionaries, and other structured values are shortened to keep the message readable.","behavior":"Show a brief Android message. Lists, dictionaries, and other structured values are shortened to keep the message readable.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"text","type":"Any","defaultValue":null,"description":"Toast text or structured value to display compactly.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No return value.","example":"# Query Android or request a documented system action\nSystem.toast(\"Macro started\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-stop","kind":"STATIC_METHOD","parentKey":"class-system","name":"stop","signature":"System.stop()","description":"Stop the current macro immediately from script.","behavior":"Stop the current macro immediately from script.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"no","details":"Stops all macro flows; later lines do not run. Use Flow.stop(name) to stop one background flow."},"limitations":[],"relatedApis":["class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"Stops execution; no return value is observed.","example":"# Query Android or request a documented system action\nif Storage.get(\"stop_requested\", False):\n    System.stop()\nprint(\"Still running\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-minimized-dock","kind":"STATIC_METHOD","parentKey":"class-system","name":"minimized_dock","signature":"System.minimized_dock(point=None, *, width=None, height=None, alpha=None, mode=None)","description":"Query or adjust the minimized overlay dock. The point uses the same coordinate scale and anchor rules as Point-based click targets; width and height are current-screen pixels.","behavior":"Query or adjust the minimized overlay dock. The point uses the same coordinate scale and anchor rules as Point-based click targets; width and height are current-screen pixels.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"point","type":"Point?","defaultValue":"None","description":"Optional top-left dock position.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"width","type":"Number?","defaultValue":"None","description":"Optional minimized dock footprint width in pixels. While a collapsed floating panel is attached, the dock uses its natural size; the requested size is retained and reapplied when the attachment is gone.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"height","type":"Number?","defaultValue":"None","description":"Optional minimized dock footprint height in pixels. While a collapsed floating panel is attached, the dock uses its natural size; the requested size is retained and reapplied when the attachment is gone.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"alpha","type":"Number?","defaultValue":"None","description":"Optional dock opacity from 0.2 to 1.0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"mode","type":"String?","defaultValue":"None","description":"Optional dock presentation: icon, row, or hidden. icon retains the open button for a collapsed floating panel. hidden lasts for this run and keeps a bottom-left Stop button when no visible floating panel Stop button is available; when the panel is collapsed, this emergency window also provides its open button.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"dict","returnDescription":"Applied state with `applied`, `x`, `y`, `width`, `height`, `alpha`, `mode`, and optional `reason`.","example":"# Move, resize, and collapse the minimized dock for this run\nSystem.minimized_dock(Point(24, 120), width=72, height=36, alpha=0.85, mode=\"icon\")","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-send-key","kind":"STATIC_METHOD","parentKey":"class-system","name":"send_key","signature":"System.send_key(key)","description":"Send one Android key down/up pair to the currently focused text editor through Accessibility on Android 13 or later. Sends key events without locating keys on the on-screen keyboard.","behavior":"Send one Android key down/up pair to the currently focused text editor through Accessibility on Android 13 or later. Sends key events without locating keys on the on-screen keyboard.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"String|Number","defaultValue":null,"description":"Android key name, case-insensitive with optional `KEYCODE_` prefix, such as `ENTER`, `TAB`, `ESCAPE`, `DEL`, `DPAD_LEFT`, `A`, or `F1`; or a positive whole Android keycode, such as `66` for Enter. Whitespace around names is ignored.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"`True` when both key events are dispatched; `False` on Android 12L or earlier, for an unsupported key, without an active editor input connection, or when dispatch fails. The target app decides how to handle the key; verify its screen before continuing. This does not send a system-wide hardware key or confirm that the app handled it.","example":"# Send keys to the focused text field by name or Android keycode\nsent = System.send_key(\"ENTER\")\nSystem.send_key(key=\"TAB\")\nSystem.send_key(66)","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-back","kind":"STATIC_METHOD","parentKey":"class-system","name":"back","signature":"System.back()","description":"Ask Android to go back, like pressing the Back button.","behavior":"Ask Android to go back, like pressing the Back button.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.back())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-home","kind":"STATIC_METHOD","parentKey":"class-system","name":"home","signature":"System.home()","description":"Ask Android to open the home screen.","behavior":"Ask Android to open the home screen.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.home())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-recent","kind":"STATIC_METHOD","parentKey":"class-system","name":"recent","signature":"System.recent()","description":"Open recents screen.","behavior":"Open recents screen.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.recent())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-noti","kind":"STATIC_METHOD","parentKey":"class-system","name":"noti","signature":"System.noti()","description":"Open notifications shade.","behavior":"Open notifications shade.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.noti())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-lockscreen","kind":"STATIC_METHOD","parentKey":"class-system","name":"lockscreen","signature":"System.lockscreen()","description":"Lock the current screen.","behavior":"Lock the current screen.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.lockscreen())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-powerdialog","kind":"STATIC_METHOD","parentKey":"class-system","name":"powerdialog","signature":"System.powerdialog()","description":"Open power dialog.","behavior":"Open power dialog.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.powerdialog())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-quicksetting","kind":"STATIC_METHOD","parentKey":"class-system","name":"quicksetting","signature":"System.quicksetting()","description":"Open Android quick settings.","behavior":"Open Android quick settings.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.quicksetting())","aliases":[],"group":"FLOW"},{"key":"class-system-static-method-screenshot","kind":"STATIC_METHOD","parentKey":"class-system","name":"screenshot","signature":"System.screenshot()","description":"Ask Android to take a screenshot.","behavior":"Ask Android to take a screenshot.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if Android accepts the action, otherwise `False`.","example":"# Query Android or request a documented system action\nprint(System.screenshot())","aliases":[],"group":"FLOW"},{"key":"class-screencapture","kind":"CLASS","parentKey":null,"name":"ScreenCapture","signature":"ScreenCapture","description":"Control whether screen recognition reuses captured images during the current macro run. Normally, a captured image can be reused for up to 100 ms. Call these methods directly on ScreenCapture; do not create an instance.","behavior":"Control whether screen recognition reuses captured images during the current macro run. Normally, a captured image can be reused for up to 100 ms. Call these methods directly on ScreenCapture; do not create an instance.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"conditional","details":"Changes image reuse for all flows, without capturing, waiting for the chosen duration, or requesting capture permission. The next capture uses the setting."},"limitations":[],"relatedApis":["class-region","class-flow"],"isCallable":false,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Reuse one captured frame for several screen checks\nScreenCapture.cache_on()\ncolor = Color.get(Point(500, 900))\nhit = Region.full_screen().find(\"enemy\", timeout=0)\nScreenCapture.cache_off()\n\n# Prefer the freshest available frame for a short recognition burst\nScreenCapture.auto_cache_off(duration_ms=1000)\nhit = Region.full_screen().find(\"enemy\", timeout=800, rate=30)\n\n# Disable without a timer, then restore automatic caching explicitly\nScreenCapture.auto_cache_off()\nhit = Region.full_screen().find(\"enemy\", timeout=2000, rate=30)\nScreenCapture.auto_cache_on()","aliases":[],"group":null},{"key":"class-screencapture-static-method-cache-on","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"cache_on","signature":"ScreenCapture.cache_on()","description":"Keep one captured screen image for repeated checks until cache_off() or the macro run ends. Use the next available image, or the latest valid image if no new one is ready. This takes priority over automatic reuse settings and does not request screen-capture permission.","behavior":"Keep one captured screen image for repeated checks until cache_off() or the macro run ends. Use the next available image, or the latest valid image if no new one is ready. This takes priority over automatic reuse settings and does not request screen-capture permission.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"conditional","details":"Changes image reuse for all flows, without capturing, waiting for the chosen duration, or requesting capture permission. The next capture uses the setting."},"limitations":[],"relatedApis":["class-region","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Pin one shared frame for two recognition passes\nScreenCapture.cache_on()\nregion = Region(100, 200, 300, 400)\nfirst = region.find(\"start\", 0)\nsecond = region.find(\"confirm\", 0)\nScreenCapture.cache_off()\nprint(first.found, second.found)","aliases":[],"group":"FLOW"},{"key":"class-screencapture-static-method-cache-off","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"cache_off","signature":"ScreenCapture.cache_off()","description":"Stop keeping the image selected by cache_on(). Automatic reuse settings stay unchanged, so a recent image may still be reused. Also call auto_cache_off() when each check needs the newest available image.","behavior":"Stop keeping the image selected by cache_on(). Automatic reuse settings stay unchanged, so a recent image may still be reused. Also call auto_cache_off() when each check needs the newest available image.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"conditional","details":"Changes image reuse for all flows, without capturing, waiting for the chosen duration, or requesting capture permission. The next capture uses the setting."},"limitations":[],"relatedApis":["class-region","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Remove explicit pinning before the next scan\nScreenCapture.cache_off()\nregion = Region(100, 200, 300, 400)\nprint(region.find(\"start\", 0).found)","aliases":[],"group":"FLOW"},{"key":"class-screencapture-static-method-auto-cache-off","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"auto_cache_off","signature":"ScreenCapture.auto_cache_off(duration_ms=None)","description":"Turn off automatic image reuse so capture requests seek the newest available image. Return immediately; a duration starts at this call, and calling again replaces it. Applies to bitmap, raw-image, TFLite, and pixel capture. This can increase processing and battery use without making execution faster or forcing Android to draw new pixels; waiting for an image remains limited. It does not cancel cache_on() or request capture permission.","behavior":"Turn off automatic image reuse so capture requests seek the newest available image. Return immediately; a duration starts at this call, and calling again replaces it. Applies to bitmap, raw-image, TFLite, and pixel capture. This can increase processing and battery use without making execution faster or forcing Android to draw new pixels; waiting for an image remains limited. It does not cancel cache_on() or request capture permission.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"conditional","details":"Changes image reuse for all flows, without capturing, waiting for the chosen duration, or requesting capture permission. The next capture uses the setting."},"limitations":[],"relatedApis":["class-region","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"duration_ms","type":"Number | None","defaultValue":"None","description":"Duration in positive whole milliseconds (100 and 100.0 are valid). Omit or use None to stay off until auto_cache_on() or the macro run ends. Zero, negative, fractional, string, boolean, and overflowing values raise an error.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No return value.","example":"# Temporarily bypass automatic cache; explicit pinning is separate\nScreenCapture.cache_off()\nScreenCapture.auto_cache_off(1000)\nregion = Region(100, 200, 300, 400)\nprint(region.find(\"start\", 500).found)\nScreenCapture.auto_cache_on()","aliases":[],"group":"FLOW"},{"key":"class-screencapture-static-method-auto-cache-on","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"auto_cache_on","signature":"ScreenCapture.auto_cache_on()","description":"Allow automatic image reuse again immediately, canceling any previous off period. The macro also restores this when its run ends. This does not cancel cache_on(), request capture permission, or wait.","behavior":"Allow automatic image reuse again immediately, canceling any previous off period. The macro also restores this when its run ends. This does not cancel cache_on(), request capture permission, or wait.","execution":{"blocking":"no","threadSafety":"serialized","parallel":"conditional","details":"Changes image reuse for all flows, without capturing, waiting for the chosen duration, or requesting capture permission. The next capture uses the setting."},"limitations":[],"relatedApis":["class-region","class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":"# Restore normal automatic frame reuse\nScreenCapture.auto_cache_on()\nregion = Region(100, 200, 300, 400)\nprint(region.find(\"start\", 0).found)","aliases":[],"group":"FLOW"},{"key":"class-storage","kind":"CLASS","parentKey":null,"name":"Storage","signature":"Storage","description":"Save named values for the current macro to use in later runs. All flows in the same run share Storage; ordinary variables are shared only by sequential PYTHON_CODE actions in one flow, including GROUP actions. Parallel flows have separate variables. Storage is not a messaging channel between processes.","behavior":"Save named values for the current macro to use in later runs. All flows in the same run share Storage; ordinary variables are shared only by sequential PYTHON_CODE actions in one flow, including GROUP actions. Parallel flows have separate variables. Storage is not a messaging channel between processes.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":false,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Persist values across separate macro runs\nrun_count = Storage.get(\"run_count\", 0)\nrun_count = run_count + 1\nStorage.set(\"run_count\", run_count)\nStorage.set(\"last_point\", Point(500, 900))\nMacroPanel.notify(\"Run #\" + str(run_count))","aliases":[],"group":null},{"key":"class-storage-static-method-get","kind":"STATIC_METHOD","parentKey":"class-storage","name":"get","signature":"Storage.get(key, default=None)","description":"Read one persisted value by key and optionally fall back to a default when the key is missing.","behavior":"Read one persisted value by key and optionally fall back to a default when the key is missing.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback value returned when the key is missing.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Any?","returnDescription":"The stored value for that key, or the provided default.","example":"# Restore a persisted counter with a fallback default\nrun_count = Storage.get(\"run_count\", 0)","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-set","kind":"STATIC_METHOD","parentKey":"class-storage","name":"set","signature":"Storage.set(key, value)","description":"Save a value under a key, replacing any previous value. Supported types include Number, String, Boolean, Point, Region, list, tuple, dict, set, and None; collections may contain other collections.","behavior":"Save a value under a key, replacing any previous value. Supported types include Number, String, Boolean, Point, Region, list, tuple, dict, set, and None; collections may contain other collections.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to write.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to persist for that key.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"No return value. Other Storage reads see the change immediately. Changes are saved to the device after 2 seconds without a new write and again when the macro and all background flows finish.","example":"# Persist values for the next macro run\nStorage.set(\"run_count\", 3)\nStorage.set(\"last_point\", Point(500, 900))","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-remove","kind":"STATIC_METHOD","parentKey":"class-storage","name":"remove","signature":"Storage.remove(key)","description":"Remove one persisted entry and return the old value.","behavior":"Remove one persisted entry and return the old value.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to remove.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Any?","returnDescription":"The removed value, or None when the key was missing.","example":"# Drop a persisted flag when it is no longer needed\nold_flag = Storage.remove(\"boost_enabled\")","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-contains","kind":"STATIC_METHOD","parentKey":"class-storage","name":"contains","signature":"Storage.contains(key)","description":"Check whether a persisted key currently exists.","behavior":"Check whether a persisted key currently exists.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to test.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"}],"returnType":"Boolean","returnDescription":"`True` when the key exists, otherwise `False`.","example":"# Guard logic based on persisted state\nif Storage.contains(\"last_point\"):\n    MacroPanel.notify(\"Saved point is ready\")","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-keys","kind":"STATIC_METHOD","parentKey":"class-storage","name":"keys","signature":"Storage.keys()","description":"Get all persisted keys as a list in insertion order.","behavior":"Get all persisted keys as a list in insertion order.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A list of persisted keys.","example":"# Inspect which values are persisted for this macro\nsaved_keys = Storage.keys()","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-values","kind":"STATIC_METHOD","parentKey":"class-storage","name":"values","signature":"Storage.values()","description":"Get all persisted values as a list in insertion order.","behavior":"Get all persisted values as a list in insertion order.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A list of persisted values.","example":"# Read all persisted values for quick inspection\nsaved_values = Storage.values()","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-clear","kind":"STATIC_METHOD","parentKey":"class-storage","name":"clear","signature":"Storage.clear()","description":"Remove every persisted entry for the current macro.","behavior":"Remove every persisted entry for the current macro.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow","class-storage-static-method-to-dict"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No direct return value. The storage becomes empty.","example":"# Reset all persisted Storage values\nStorage.clear()","aliases":[],"group":"FLOW"},{"key":"class-storage-static-method-to-dict","kind":"STATIC_METHOD","parentKey":"class-storage","name":"to_dict","signature":"Storage.to_dict()","description":"Get the dictionary used by Storage in this run. All flows share it: adding, changing, or deleting its entries changes Storage immediately. These edits are saved after 2 seconds without a new write and again when the macro and all background flows finish.","behavior":"Get the dictionary used by Storage in this run. All flows share it: adding, changing, or deleting its entries changes Storage immediately. These edits are saved after 2 seconds without a new write and again when the macro and all background flows finish.","execution":{"blocking":"conditional","threadSafety":"serialized","parallel":"conditional","details":"Flows share Storage. Each operation, including edits inside stored collections, is protected. Another flow can write between get() and set(); use one writer to avoid overwriting its update."},"limitations":[],"relatedApis":["class-flow"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"The Storage dictionary itself, not a separate copy.","example":"# Read and update the full persisted storage dictionary\nstate = Storage.to_dict()\nstate[\"bonus\"] = 5\nMacroPanel.notify(str(state))","aliases":[],"group":"FLOW"},{"key":"function-click","kind":"FUNCTION","parentKey":null,"name":"click","signature":"click(target, hold_ms=0, offset=(0, 0), random=0, delay_before=0, delay_after=0, parallel=False)","description":"Press and release each target point. By default, wait for the click to finish before continuing. Parameters accept positional or named arguments in the documented order.","behavior":"Press and release each target point. By default, wait for the click to finish before continuing. Parameters accept positional or named arguments in the documented order.","execution":{"blocking":"conditional","threadSafety":"limited","parallel":"conditional","details":"parallel=True queues touches; delay_before, delay_after still wait outside collect mode. Touch.collect() gathers, send() sends, and wait() waits for completion. Different flows’ touches can interfere."},"limitations":[],"relatedApis":["class-touch-static-method-collect","class-touch-static-method-send","class-touch-static-method-wait"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"target","type":"Point | tuple[Number, Number] | Match | MatchList","defaultValue":null,"description":"Point, fixed pixel coordinates (x, y), or search results. Use Point for scaling or anchoring. Click every found point; do nothing when no point was found.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"hold_ms","type":"Int","defaultValue":"0","description":"Hold duration in milliseconds","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"offset","type":"tuple[Number, Number]","defaultValue":"(0, 0)","description":"Horizontal and vertical pixel offsets added to the final target coordinates.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"random","type":"Number | tuple[Number, Number]","defaultValue":"0","description":"Maximum random pixel offset in each direction from the target. A number applies to both axes; (x, y) sets each axis separately. Negative values become 0.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay before the click in milliseconds.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"delay_after","type":"Number","defaultValue":"0","description":"Delay after the click in milliseconds.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"},{"name":"parallel","type":"Boolean","defaultValue":"False","description":"True: queue the touch and return its numeric id without waiting for completion. After Touch.collect(), wait for Touch.send(); collected touches can overlap with different delay_before values. Cancel with Touch.cancel(id), or cancel all with Touch.cancel().","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Number | list[Number] | None","returnDescription":"With parallel=True: one touch id for one point, or a list of ids for multiple points. Otherwise, or when no point was found: None.","example":"# Click screen coordinates with Point or tuple\nclick(Point(500, 900))\nclick((500, 900))\nclick((500, 900), hold_ms=200)\nclick(Point(500, 900), 0, (0, 0), 10, 0, 500)\n\nmatch = Region(100, 200, 300, 400).find(\"start\", 3000)\nif match.found:\n    click(match, offset=(0, 6))\n\nhits = Region(100, 200, 300, 400).find_any([\"a\", \"b\"], 3000)\nif hits:\n    click(hits, random=0)\n\n# Collect two parallel touches, send them together, then wait for the queue\nTouch.collect()\na = click(Point(300, 900), parallel=True)\nb = click(Point(780, 900), parallel=True)\nTouch.send()\nTouch.wait()\n\n# Hold p1, then tap p2 after 1 second without releasing p1\nTouch.collect()\np1 = click(Point(300, 900), hold_ms=5000, parallel=True)\np2 = click(Point(780, 900), hold_ms=1000, delay_before=1000, parallel=True)\nTouch.send()\nTouch.cancel(p1)\nTouch.wait()","aliases":[],"group":"GESTURE"},{"key":"function-swipe","kind":"FUNCTION","parentKey":null,"name":"swipe","signature":"swipe(points, *, parallel=False)","description":"Move one finger through the SwipePoint values in order. By default, wait for the swipe to finish before continuing.","behavior":"Move one finger through the SwipePoint values in order. By default, wait for the swipe to finish before continuing.","execution":{"blocking":"conditional","threadSafety":"limited","parallel":"conditional","details":"parallel=True queues touches; delay_before, delay_after still wait outside collect mode. Touch.collect() gathers, send() sends, and wait() waits for completion. Different flows’ touches can interfere."},"limitations":[],"relatedApis":["class-touch-static-method-collect","class-touch-static-method-send","class-touch-static-method-wait"],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"points","type":"list[SwipePoint]","defaultValue":null,"description":"Flat path for one finger. Requires at least 2 points.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"parallel","type":"Boolean","defaultValue":"False","description":"True: queue the swipe without waiting for completion. After Touch.collect(), wait for Touch.send(). Cancel with Touch.cancel(id), or cancel all with Touch.cancel().","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"Number | None","returnDescription":"Returns a numeric id only when parallel=True; otherwise None.","example":"path = [\n    SwipePoint(Point(500, 1500), speed=\"FAST\"),\n    SwipePoint((560, 980), speed=\"NORMAL\", humanized=True),\n    SwipePoint(Point(500, 500))\n]\nswipe(path)\n\nTouch.collect()\nleft = swipe(path, parallel=True)\nright = swipe([\n    SwipePoint(Point(780, 1500), speed=\"FAST\"),\n    SwipePoint(Point(780, 500))\n], parallel=True)\nTouch.send()\nTouch.wait()","aliases":[],"group":"GESTURE"},{"key":"function-wait","kind":"FUNCTION","parentKey":null,"name":"wait","signature":"wait(ms, /)","description":"Pause script execution for a given number of milliseconds.","behavior":"Pause script execution for a given number of milliseconds.","execution":{"blocking":"yes","threadSafety":"limited","parallel":"conditional","details":"Waits for the duration or touch completion. Other flows can continue; pause and stop still apply."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"ms","type":"Int","defaultValue":null,"description":"Wait duration in milliseconds; negative values become 0. Macro Pause and Stop remain available during the wait.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"None","returnDescription":"No return value","example":"click(Point(500, 900))\nwait(1000)  # Wait 1 second\nclick(Point(500, 900))","aliases":["sleep"],"group":"FLOW"},{"key":"function-text","kind":"FUNCTION","parentKey":null,"name":"text","signature":"text(value, /, focus_index=0)","description":"Replace the contents of an editable text field with value.","behavior":"Replace the contents of an editable text field with value.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"String","defaultValue":null,"description":"Text to input","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"focus_index","type":"Int","defaultValue":"0","description":"0: use the focused editable field, or the first editable field if none is focused. N >= 1: focus and use the N-th editable field.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"None","returnDescription":"None. If no editable field is found, no text is entered.","example":"click(Point(300, 500))  # Click input field\nwait(200)\ntext(\"Hello World\", 1)","aliases":[],"group":"INPUT"},{"key":"function-range","kind":"FUNCTION","parentKey":null,"name":"range","signature":"range(stop, /) | range(start, stop, step=1, /)","description":"Generate a sequence of integers for use in for-loops.","behavior":"Generate a sequence of integers for use in for-loops.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Int","defaultValue":"0","description":"Start value (inclusive)","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"stop","type":"Int","defaultValue":null,"description":"End value (exclusive)","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"step","type":"Int","defaultValue":"1","description":"Difference between consecutive values. Use a negative value to count down; 0 raises an error.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"}],"returnType":"range","returnDescription":"An immutable, reusable integer sequence ending before stop. Empty when step points away from stop. Use list(result) for an editable list.","example":"# Repeat a click at five evenly spaced positions\nnumbers = range(5)\n\nfor i in numbers:\n    click(Point(100 + i * 50, 500))  # returns None","aliases":[],"group":"FLOW"},{"key":"function-enumerate","kind":"FUNCTION","parentKey":null,"name":"enumerate","signature":"enumerate(iterable, start=0)","description":"Number input items as you loop over them.","behavior":"Number input items as you loop over them.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Value to enumerate. Dictionaries enumerate keys.","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"start","type":"Int","defaultValue":"0","description":"First index value.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"enumerate","returnDescription":"A one-use iterator of (index, item) pairs. Items are read only as needed. Use list(result) to keep the pairs.","example":"# Number items before using them\nnames = [\"alpha\", \"beta\"]\nfor pair in enumerate(names, start=1):\n    text(str(pair[0]) + \": \" + pair[1])","aliases":[],"group":"COLLECTION"},{"key":"function-zip","kind":"FUNCTION","parentKey":null,"name":"zip","signature":"zip(*iterables, strict=False)","description":"Pair items at the same position in each input as you loop.","behavior":"Pair items at the same position in each input as you loop.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Values to combine. Dictionaries contribute keys.","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"},{"name":"strict","type":"Boolean","defaultValue":"False","description":"False: stop at the shortest input. True: raise an error while reading if input lengths differ. Pass by name.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"zip","returnDescription":"A one-use iterator of tuples, each containing one item per input. Use list(result) to keep the tuples.","example":"# Pair labels with click points\nlabels = [\"left\", \"right\"]\npoints = [Point(100, 500), Point(900, 500)]\nfor pair in zip(labels, points):\n    text(pair[0])\n    click(pair[1])","aliases":[],"group":"COLLECTION"},{"key":"function-random","kind":"FUNCTION","parentKey":null,"name":"random","signature":"random()","description":"Return a random floating-point number in the 0 -> 1 range.","behavior":"Return a random floating-point number in the 0 -> 1 range.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Float","returnDescription":"Random floating-point value in 0 -> 1 (1 is exclusive).","example":"chance = random()\nif chance < 0.25:\n    text(\"lucky\")","aliases":[],"group":"FLOW"},{"key":"function-random-int","kind":"FUNCTION","parentKey":null,"name":"random_int","signature":"random_int(min, max, /)","description":"Return a random integer in the inclusive min -> max range.","behavior":"Return a random integer in the inclusive min -> max range.","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"min","type":"Int","defaultValue":null,"description":"Lower bound of the range.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"max","type":"Int","defaultValue":null,"description":"Upper bound of the range.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Random integer between min and max (inclusive).","example":"delay_steps = random_int(1, 4)\nwait(delay_steps * 100)","aliases":[],"group":"FLOW"},{"key":"function-len","kind":"FUNCTION","parentKey":null,"name":"len","signature":"len(value, /)","description":"Get size of a String, list/tuple, or dict.","behavior":"Get size of a String, list/tuple, or dict.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"String | list | tuple | dict","defaultValue":null,"description":"Value to measure","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Number of items/characters.","example":"name = \"CogniTab\"\ncount = len(name)\ntext(str(count))","aliases":[],"group":"COLLECTION"},{"key":"function-int","kind":"FUNCTION","parentKey":null,"name":"int","signature":"int(value=0, /)","description":"Convert value to an integer, discarding the decimal part of numeric inputs. Text must contain an integer; decimal text raises an error. True becomes 1 and False becomes 0.","behavior":"Convert value to an integer, discarding the decimal part of numeric inputs. Text must contain an integer; decimal text raises an error. True becomes 1 and False becomes 0.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float | Boolean | String","defaultValue":"0","description":"Value to cast","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Converted integer value.","example":"threshold = int(3.9)\ntext(str(threshold))","aliases":[],"group":"TYPE_CAST"},{"key":"function-float","kind":"FUNCTION","parentKey":null,"name":"float","signature":"float(value=0.0, /)","description":"Convert value to a decimal number. Text must contain a valid number; True becomes 1.0 and False becomes 0.0.","behavior":"Convert value to a decimal number. Text must contain a valid number; True becomes 1.0 and False becomes 0.0.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float | Boolean | String","defaultValue":"0.0","description":"Value to cast","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Converted floating-point value.","example":"score = float(\"0.85\")\nif score > 0.8:\n    text(\"ok\")","aliases":[],"group":"TYPE_CAST"},{"key":"function-str","kind":"FUNCTION","parentKey":null,"name":"str","signature":"str(value=\"\", /)","description":"Convert value to text. Existing strings stay unchanged; numbers and built-in collections use Python text notation.","behavior":"Convert value to text. Existing strings stay unchanged; numbers and built-in collections use Python text notation.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":"\"\"","description":"Value to convert","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Text form of the value.","example":"total = 12\ntext(\"Total: \" + str(total))","aliases":[],"group":"TYPE_CAST"},{"key":"function-type","kind":"FUNCTION","parentKey":null,"name":"type","signature":"type(value, /)","description":"Return the Python-like class descriptor string for a value, for example <class 'int'>.","behavior":"Return the Python-like class descriptor string for a value, for example <class 'int'>.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":null,"description":"Value to inspect","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"String","returnDescription":"Python-like type descriptor.","example":"value = 42\nprint(type(value))","aliases":[],"group":"TYPE_CAST"},{"key":"function-print","kind":"FUNCTION","parentKey":null,"name":"print","signature":"print(*values, sep=\" \", end=\"\\n\")","description":"Write values to the overlay script console and continue execution. Values use the same text as str(value).","behavior":"Write values to the overlay script console and continue execution. Values use the same text as str(value).","execution":{"blocking":"conditional","threadSafety":"not-guaranteed","parallel":"conditional","details":"Waits depend on the API. Give each flow separate objects to change; editing one object from several flows can produce unexpected results."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"values","type":"Any","defaultValue":null,"description":"Values to print","suggestAsNamedArg":false,"requirement":"optional","callingMode":"variadic"},{"name":"sep","type":"String","defaultValue":"\" \"","description":"Separator between values","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"end","type":"String","defaultValue":"\"\\n\"","description":"Suffix appended after each print call","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"None","returnDescription":"No return value.","example":"count = 3\nprint(\"remaining\", count, sep=\": \")\nprint(\"done\", end=\"\")","aliases":[],"group":"FLOW"},{"key":"function-bool","kind":"FUNCTION","parentKey":null,"name":"bool","signature":"bool(value=False, /)","description":"Convert value to True or False for use in conditions.","behavior":"Convert value to True or False for use in conditions.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":"False","description":"Value to convert","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Boolean","returnDescription":"False for None, False, 0, or empty text/collections; Match uses its found value. True otherwise.","example":"enabled = bool(1)\nif enabled:\n    text(\"enabled\")","aliases":[],"group":"TYPE_CAST"},{"key":"function-abs","kind":"FUNCTION","parentKey":null,"name":"abs","signature":"abs(value, /)","description":"Return absolute value.","behavior":"Return absolute value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int | Float","returnDescription":"Absolute numeric value.","example":"delta = abs(-12.5)\ntext(str(delta))","aliases":[],"group":"MATH"},{"key":"function-sum","kind":"FUNCTION","parentKey":null,"name":"sum","signature":"sum(iterable, /, start=0)","description":"Add the input numbers to start and return the total.","behavior":"Add the input numbers to start and return the total.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"list | tuple | set | generator","defaultValue":null,"description":"A collection or generator supplying numbers one at a time. A generator expression needs its own parentheses if another argument or a trailing comma follows it.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"start","type":"Number","defaultValue":"0","description":"Initial value added before iterable items.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Number","returnDescription":"Total numeric value.","example":"# Sum generated values\nvalues = [1, 2, 3]\ntotal = sum(value * 2 for value in values)\nwith_start = sum((value * 2 for value in values), start=10)\ntext(str(total))\ntext(str(with_start))","aliases":[],"group":"MATH"},{"key":"function-min","kind":"FUNCTION","parentKey":null,"name":"min","signature":"min(iterable, /, *, key=None) | min(iterable, /, *, default, key=None) | min(arg1, arg2, /, *args, key=None)","description":"Return the smallest item from one iterable or the smallest of two or more arguments. key can compute the value used for ordering; ties keep the first item encountered.","behavior":"Return the smallest item from one iterable or the smallest of two or more arguments. key can compute the value used for ordering; ties keep the first item encountered.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"Processes values in the current flow. A key function runs there too; its waits and changes happen before this call returns."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict","defaultValue":null,"description":"A value whose items can be read one at a time, such as a list or string. For dict, compare keys.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"args","type":"Any","defaultValue":null,"description":"Additional positional values when passing two or more arguments.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"variadic"},{"name":"default","type":"Any","defaultValue":"-","description":"Value returned when the single iterable is empty. Only valid with one iterable argument.","suggestAsNamedArg":true,"requirement":"overload-dependent","callingMode":"keyword-only"},{"name":"key","type":"Callable?","defaultValue":"None","description":"A function called with each item; compare its result instead of the item. None compares items directly.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"Any","returnDescription":"The original smallest item, or default for empty input. Empty input without default, or values that cannot be compared, raises an error.","example":"# Pick the lowest score, with a safe empty-list fallback\nbest = min([0.9, 0.7, 0.85])\nfallback = min([], default=\"none\")\nclosest = min([12, -5, 7], key=lambda value: abs(value))\ntext(str(closest))","aliases":[],"group":"MATH"},{"key":"function-max","kind":"FUNCTION","parentKey":null,"name":"max","signature":"max(iterable, /, *, key=None) | max(iterable, /, *, default, key=None) | max(arg1, arg2, /, *args, key=None)","description":"Return the largest item from one iterable or the largest of two or more arguments. key can compute the value used for ordering; ties keep the first item encountered.","behavior":"Return the largest item from one iterable or the largest of two or more arguments. key can compute the value used for ordering; ties keep the first item encountered.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"Processes values in the current flow. A key function runs there too; its waits and changes happen before this call returns."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict","defaultValue":null,"description":"A value whose items can be read one at a time, such as a list or string. For dict, compare keys.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"positional-only"},{"name":"args","type":"Any","defaultValue":null,"description":"Additional positional values when passing two or more arguments.","suggestAsNamedArg":false,"requirement":"overload-dependent","callingMode":"variadic"},{"name":"default","type":"Any","defaultValue":"-","description":"Value returned when the single iterable is empty. Only valid with one iterable argument.","suggestAsNamedArg":true,"requirement":"overload-dependent","callingMode":"keyword-only"},{"name":"key","type":"Callable?","defaultValue":"None","description":"A function called with each item; compare its result instead of the item. None compares items directly.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"Any","returnDescription":"The original largest item, or default for empty input. Empty input without default, or values that cannot be compared, raises an error.","example":"# Pick the highest score, with a safe empty-list fallback\npeak = max([0.9, 0.7, 0.85])\nfallback = max([], default=\"none\")\nlongest = max([\"a\", \"team\", \"go\"], key=lambda value: len(value))\ntext(longest)","aliases":[],"group":"MATH"},{"key":"function-sorted","kind":"FUNCTION","parentKey":null,"name":"sorted","signature":"sorted(iterable, /, *, key=None, reverse=False)","description":"Return a new list sorted from smallest to largest. Items with equal comparison values keep their original order, even with reverse=True.","behavior":"Return a new list sorted from smallest to largest. Items with equal comparison values keep their original order, even with reverse=True.","execution":{"blocking":"conditional","threadSafety":"isolated","parallel":"conditional","details":"Processes values in the current flow. A key function runs there too; its waits and changes happen before this call returns."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict | set","defaultValue":null,"description":"A value whose items can be read one at a time, such as a list or string. For dict, sort keys.","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"key","type":"Callable?","defaultValue":"None","description":"A function called with each item; compare its result instead of the item. None compares items directly.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"},{"name":"reverse","type":"Boolean","defaultValue":"False","description":"Sort descending when True.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"keyword-only"}],"returnType":"list","returnDescription":"A new sorted list. The input value is not modified.","example":"values = sorted([3, 1, 2])\ntext(str(values))","aliases":[],"group":"COLLECTION"},{"key":"function-round","kind":"FUNCTION","parentKey":null,"name":"round","signature":"round(number, ndigits=None)","description":"Round value to a given number of decimal digits.","behavior":"Round value to a given number of decimal digits.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"number","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":true,"requirement":"required","callingMode":"positional-or-keyword"},{"name":"ndigits","type":"Int?","defaultValue":"None","description":"Decimal places to keep; negative values round tens, hundreds, and so on. None returns an integer. Halfway values round to the nearest even result.","suggestAsNamedArg":true,"requirement":"optional","callingMode":"positional-or-keyword"}],"returnType":"Int | Float","returnDescription":"Rounded numeric value.","example":"ratio = round(0.87654, 2)\ntext(str(ratio))","aliases":[],"group":"MATH"},{"key":"function-sqrt","kind":"FUNCTION","parentKey":null,"name":"sqrt","signature":"sqrt(value, /)","description":"Return square root of a non-negative value.","behavior":"Return square root of a non-negative value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number (>= 0)","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Square root value.","example":"distance = sqrt(144)\ntext(str(distance))","aliases":[],"group":"MATH"},{"key":"function-pow","kind":"FUNCTION","parentKey":null,"name":"pow","signature":"pow(base, exponent, /)","description":"Raise base to exponent.","behavior":"Raise base to exponent.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"base","type":"Int | Float","defaultValue":null,"description":"Base value","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"exponent","type":"Int | Float","defaultValue":null,"description":"Exponent value","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int | Float","returnDescription":"Power result.","example":"boost = pow(1.2, 3)\ntext(str(boost))","aliases":[],"group":"MATH"},{"key":"function-floor","kind":"FUNCTION","parentKey":null,"name":"floor","signature":"floor(value, /)","description":"Return largest integer not greater than value.","behavior":"Return largest integer not greater than value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Floored value.","example":"bucket = floor(9.99)\ntext(str(bucket))","aliases":[],"group":"MATH"},{"key":"function-ceil","kind":"FUNCTION","parentKey":null,"name":"ceil","signature":"ceil(value, /)","description":"Return smallest integer not smaller than value.","behavior":"Return smallest integer not smaller than value.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Int","returnDescription":"Ceiling value.","example":"bucket = ceil(9.01)\ntext(str(bucket))","aliases":[],"group":"MATH"},{"key":"function-sin","kind":"FUNCTION","parentKey":null,"name":"sin","signature":"sin(value, /)","description":"Return sine of value in radians.","behavior":"Return sine of value in radians.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Sine result.","example":"wave = sin(0)\ntext(str(wave))","aliases":[],"group":"MATH"},{"key":"function-cos","kind":"FUNCTION","parentKey":null,"name":"cos","signature":"cos(value, /)","description":"Return cosine of value in radians.","behavior":"Return cosine of value in radians.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Cosine result.","example":"wave = cos(0)\ntext(str(wave))","aliases":[],"group":"MATH"},{"key":"function-tan","kind":"FUNCTION","parentKey":null,"name":"tan","signature":"tan(value, /)","description":"Return tangent of value in radians.","behavior":"Return tangent of value in radians.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Tangent result.","example":"wave = tan(0)\ntext(str(wave))","aliases":[],"group":"MATH"},{"key":"function-log","kind":"FUNCTION","parentKey":null,"name":"log","signature":"log(value, base=None, /)","description":"Return logarithm of value. Uses natural log when base is omitted.","behavior":"Return logarithm of value. Uses natural log when base is omitted.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input value (> 0)","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"base","type":"Int | Float","defaultValue":null,"description":"Optional base (> 0 and != 1)","suggestAsNamedArg":false,"requirement":"optional","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Logarithm result.","example":"bits = log(8, 2)\ntext(str(bits))","aliases":[],"group":"MATH"},{"key":"function-clamp","kind":"FUNCTION","parentKey":null,"name":"clamp","signature":"clamp(value, min, max, /)","description":"Keep value between min and max: replace values outside the range with the nearest boundary. Reversed boundaries are accepted.","behavior":"Keep value between min and max: replace values outside the range with the nearest boundary. Reversed boundaries are accepted.","execution":{"blocking":"no","threadSafety":"isolated","parallel":"yes","details":"Calculates or changes values without waiting for capture, gestures, or user input. Keep changeable objects separate in each flow."},"limitations":[],"relatedApis":[],"isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input value","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"min","type":"Int | Float","defaultValue":null,"description":"Lower bound","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"},{"name":"max","type":"Int | Float","defaultValue":null,"description":"Upper bound","suggestAsNamedArg":false,"requirement":"required","callingMode":"positional-only"}],"returnType":"Float","returnDescription":"Clamped numeric value.","example":"safe = clamp(135, 0, 100)\ntext(str(safe))","aliases":[],"group":"MATH"}]}}