{"data":{"version":"v2.73","locale":"en","availableLocales":["en","vi","th","id","fil"],"updatedAt":"2026-09-06T12:16:54.654Z","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"}},"entries":[{"key":"class-point","kind":"CLASS","parentKey":null,"name":"Point","signature":"Point(x, y, /, scale=\"fixed\", anchor=\"none\")","description":"A point on the screen, measured in pixels. Scale/anchor control coordinate mapping across screen sizes. After mapping and offsets, runtime consumers clamp the final point to the current screen's valid pixel range. Point can be destructured as x, y.","isCallable":true,"fields":["x","y","scale","anchor"],"fieldDocs":[{"name":"x","type":"Number","defaultValue":null,"description":"Horizontal coordinate in pixels.","suggestAsNamedArg":true},{"name":"y","type":"Number","defaultValue":null,"description":"Vertical coordinate in pixels.","suggestAsNamedArg":true},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale mode. Values: fixed, auto, width, height.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor. Values: none, center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right, auto.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[{"name":"x","type":"Number","defaultValue":null,"description":"X coordinate in pixels","suggestAsNamedArg":false},{"name":"y","type":"Number","defaultValue":null,"description":"Y coordinate in pixels","suggestAsNamedArg":false},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale mode.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor.","suggestAsNamedArg":true}],"fieldExample":"# Lấy các giá trị x, y của Point\np = Point(500, 900)\nx_value = p.x #500\ny_value = p.y #900\nscale_value = p.scale #FIXED_PIXEL\n\n# Bung Point thành tọa độ x, y\nx, y = p","constructorExample":"# Khởi tạo Point có scale/anchor và nhấn vào vị trí đó\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":"Resolve this Point on the current screen, multiply integer pixel dx/dy by the selected full-screen width or height ratio without rotating the delta axes, then add the result and return a new fixed-pixel Point with anchor none. App viewport size is not used. When scale is omitted, the offset inherits this Point's scale. The original point is not mutated.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dx","type":"Int","defaultValue":null,"description":"Integer pixel delta on the Point X axis. Decimal and normalized values are rejected.","suggestAsNamedArg":true},{"name":"dy","type":"Int","defaultValue":null,"description":"Integer pixel delta on the Point Y axis. Decimal and normalized values are rejected.","suggestAsNamedArg":true},{"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}],"returnType":"Point","returnDescription":"A resolved fixed-pixel Point clamped to the current screen, whose scale is FIXED_PIXEL and anchor is NONE.","example":"# Scale delta pixel theo chiều rộng toàn màn hình rồi cộng vào 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":"Draw a highlighted square centered at this point. Re-highlighting the same point instance replaces the previous one.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Stroke thickness in dp.","suggestAsNamedArg":true},{"name":"region_width","type":"Number","defaultValue":"36","description":"Square width/height in pixels.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide after N milliseconds. 0 disables auto-hide.","suggestAsNamedArg":true}],"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":"Turn off highlight for this point instance.","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":"One point inside a flat swipe path. The point must be a Point or tuple (x, y). Pass a list of at least two SwipePoint values to swipe([...]) to move one finger through multiple points.","isCallable":true,"fields":["point","speed","delay_before","random","humanized","scale","anchor"],"fieldDocs":[{"name":"point","type":"Point","defaultValue":null,"description":"Coordinate point in pixels. Point carries scale/anchor metadata.","suggestAsNamedArg":true},{"name":"speed","type":"String","defaultValue":"NORMAL","description":"Speed preset from this point to the next point. Values: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST.","suggestAsNamedArg":true},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay before this point/segment in milliseconds.","suggestAsNamedArg":true},{"name":"random","type":"Number","defaultValue":"10","description":"Random pixel offset radius for this point.","suggestAsNamedArg":true},{"name":"humanized","type":"Boolean","defaultValue":"False","description":"Use a curved human-like path where supported.","suggestAsNamedArg":true},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale mode.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[{"name":"point","type":"Point | tuple[Number, Number]","defaultValue":null,"description":"Coordinate as Point or tuple (x, y). Point scale/anchor metadata is copied unless scale/anchor are provided on SwipePoint.","suggestAsNamedArg":true},{"name":"speed","type":"String","defaultValue":"NORMAL","description":"Speed preset from this point to the next point. Values: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST.","suggestAsNamedArg":true},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay before this point/segment in milliseconds.","suggestAsNamedArg":true},{"name":"random","type":"Number","defaultValue":"10","description":"Random pixel offset radius for this point.","suggestAsNamedArg":true},{"name":"humanized","type":"Boolean","defaultValue":"False","description":"Use a curved human-like path where supported.","suggestAsNamedArg":true},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale mode.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor.","suggestAsNamedArg":true}],"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":"# Hai ngón vuốt song song, mỗi ngón là một path phẳng\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":"Static helper for parallel click/swipe actions created by the UI or code via click(..., parallel=True) and swipe(..., parallel=True). You can collect click/swipe actions and send them together, or inspect click/swipe actions that are active or queued. The helper also supports cancelling active click/swipe actions (Android 8.0+ only).","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":"Enable collect mode for click/swipe calls with parallel=True. When enabled, parallel click/swipe calls are not sent immediately; they are collected and only sent after Touch.send(). This method works for both UI/code. If Touch.collect() is not enabled, parallel click/swipe calls are sent immediately, and later click/swipe calls must wait for the previous click/swipe to finish before they can run because running a later click/swipe immediately would cancel the previous one. You can intentionally cancel the previous click/swipe with Touch.cancel().","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-send","kind":"STATIC_METHOD","parentKey":"class-touch","name":"send","signature":"Touch.send()","description":"Send all click/swipe calls collected by Touch.collect() at once, return their matching numeric ids, then turn off Touch.collect() collection mode.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[Number]","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-queued","kind":"STATIC_METHOD","parentKey":"class-touch","name":"queued","signature":"Touch.queued()","description":"Return touch states currently in the queue.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-active","kind":"STATIC_METHOD","parentKey":"class-touch","name":"active","signature":"Touch.active()","description":"Return active touch states.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-all","kind":"STATIC_METHOD","parentKey":"class-touch","name":"all","signature":"Touch.all()","description":"Return recent and queued/active touch states.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[TouchState]","returnDescription":null,"example":null,"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 one numeric id, or every queued/active touch when id is None.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"TouchState | list[TouchState]","returnDescription":null,"example":null,"aliases":[],"group":"FLOW"},{"key":"class-touch-static-method-cancel","kind":"STATIC_METHOD","parentKey":"class-touch","name":"cancel","signature":"Touch.cancel(id=None)","description":"Cancel one queued or active touch by numeric id. When id is None, cancels every queued/active touch and returns the accepted cancel count. Active cancel requires Android 8.0+; Android 7.x scripts fail with a clear error when an active touch is targeted.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean | Int","returnDescription":null,"example":null,"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":"Snapshot of one script/UI touch item in the shared gesture queue.","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},{"name":"status","type":"String","defaultValue":null,"description":"queued, active, completed, cancelled, or failed.","suggestAsNamedArg":true},{"name":"kind","type":"String","defaultValue":null,"description":"Touch kind such as click or swipe.","suggestAsNamedArg":true},{"name":"action_order","type":"Number","defaultValue":null,"description":"Owning action order.","suggestAsNamedArg":true},{"name":"remaining_repeats","type":"Number","defaultValue":"0","description":"Repeats still queued.","suggestAsNamedArg":true},{"name":"completed_repeats","type":"Number","defaultValue":"0","description":"Repeats already completed.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":null,"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":"Template matching parameters for Region. fast_matching downsamples both the Region image and template.","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},{"name":"auto_scale","type":"Boolean","defaultValue":"False","description":"Try template sizes around the configured scale with an adaptive range: high DPI/resolution scans smaller candidates down to 0.70x, while low DPI/resolution scans larger candidates up to 1.30x.","suggestAsNamedArg":true},{"name":"cache_scale","type":"Boolean","defaultValue":"True","description":"Cache the first successful auto-scale value for later runs. Only applies when auto_scale is True.","suggestAsNamedArg":true},{"name":"template_scale","type":"String","defaultValue":"SHORT_EDGE","description":"Base template scale mode. Values: SHORT_EDGE, LONG_EDGE, DPI, SMALLEST_WIDTH_DP, NONE.","suggestAsNamedArg":true},{"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}],"constants":[],"constructorParams":[{"name":"grayscale","type":"Boolean","defaultValue":"True","description":"**Applies to templates**. Convert template matching to grayscale.","suggestAsNamedArg":true},{"name":"auto_scale","type":"Boolean","defaultValue":"False","description":"Try template sizes with an adaptive 0.70x-1.30x edge range after the configured template scale.","suggestAsNamedArg":true},{"name":"cache_scale","type":"Boolean","defaultValue":"True","description":"Cache successful auto-scale values.","suggestAsNamedArg":true},{"name":"template_scale","type":"String","defaultValue":"SHORT_EDGE","description":"Values: SHORT_EDGE, LONG_EDGE, DPI, SMALLEST_WIDTH_DP, NONE.","suggestAsNamedArg":true},{"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}],"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":null,"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 region on the screen, measured in pixels on the current screen axes. Scale/anchor control coordinate mapping across full-screen sizes without rotating through portrait coordinates or using the app viewport; runtime consumers clip the final region to the current screen after mapping and offsets. ScaleParam controls template matching inside this region. Region can be destructured as x, y, width, height.","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},{"name":"y","type":"Number","defaultValue":null,"description":"Top-left vertical coordinate.","suggestAsNamedArg":true},{"name":"width","type":"Number","defaultValue":null,"description":"Region width in pixels.","suggestAsNamedArg":true},{"name":"height","type":"Number","defaultValue":null,"description":"Region height in pixels.","suggestAsNamedArg":true},{"name":"scale","type":"String","defaultValue":"fixed","description":"**Applies to region coordinates**. Coordinate scale mode using full-screen dimensions on the current X/Y axes, without app viewport scaling or portrait rotation. Values: \"fixed\" keeps saved pixels unchanged; \"auto\" scales X by width and Y by height; \"width\" scales both axes by screen width; \"height\" scales both axes by screen height.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"**Applies to region coordinates**. Coordinate anchor. Values: none, center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right, auto.","suggestAsNamedArg":true},{"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},{"name":"middle_point","type":"Point","defaultValue":null,"description":"Center point of this region.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[{"name":"x","type":"Number","defaultValue":null,"description":"Top-left X coordinate","suggestAsNamedArg":false},{"name":"y","type":"Number","defaultValue":null,"description":"Top-left Y coordinate","suggestAsNamedArg":false},{"name":"width","type":"Number","defaultValue":null,"description":"Region width","suggestAsNamedArg":false},{"name":"height","type":"Number","defaultValue":null,"description":"Region height","suggestAsNamedArg":false},{"name":"scale","type":"String","defaultValue":"fixed","description":"**Applies to region coordinates**. Optional full-screen scale mode on the current X/Y axes. Values: \"fixed\", \"auto\", \"width\", \"height\".","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"**Applies to region coordinates**. Optional anchor mode. Values: none, center, top, bottom, left, right, top_left, top_right, bottom_left, bottom_right, auto.","suggestAsNamedArg":true},{"name":"scale_param","type":"ScaleParam","defaultValue":"ScaleParam()","description":"**Applies to templates**. Template matching scale parameters.","suggestAsNamedArg":true}],"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# Bung Region thành 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-creation-method-find","kind":"CREATION_METHOD","parentKey":"class-region","name":"find","signature":"region.find(template, timeout, threshold, rate)","description":"Scan inside this region until one template match is found or timeout is reached. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"First successful match, or found=false when timed out.","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-creation-method-find-multi","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_multi","signature":"region.find_multi(template, timeout, threshold, rate)","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"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-creation-method-find-any","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_any","signature":"region.find_any(templates, timeout, threshold, rate)","description":"Scan this region and return when any template in the list is found. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match results when any template is found, or empty list on 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-creation-method-find-all","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_all","signature":"region.find_all(templates, timeout, threshold, rate)","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match results when all templates are found, or empty list on 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-creation-method-find-color","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_color","signature":"region.find_color(color, timeout=0, tolerance=0, rate=3, interval=10)","description":"Scan this region for one target color using the same raw-frame RGB tolerance rule as UI color recognition. The best point is selected by the smallest max RGB channel delta.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":null,"description":"Target color.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; find_color returns at most one point.","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-creation-method-find-any-color","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_any_color","signature":"region.find_any_color(colors, timeout=0, tolerance=0, rate=3, interval=10)","description":"Scan this region for multiple target colors. Each input color contributes at most one best point, ordered by the input color list.","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},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; one best point per found input color.","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-creation-method-find-multi-color","kind":"CREATION_METHOD","parentKey":"class-region","name":"find_multi_color","signature":"region.find_multi_color(color, timeout=0, tolerance=0, rate=3, interval=10)","description":"Scan this region for multiple sampled positions of one target color. Passing a list or tuple is rejected so this does not silently become multi-target color search.","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},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; matching sampled points are sorted with the closest color first.","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-creation-method-wait","kind":"CREATION_METHOD","parentKey":"class-region","name":"wait","signature":"region.wait(template, timeout, threshold, rate)","description":"Wait until the template disappears from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Latest match state when the template disappears or timeout is reached.","example":"region = Region(0, 0, 1080, 2400)\nresult = region.wait(\"loading\", 8000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-creation-method-wait-any","kind":"CREATION_METHOD","parentKey":"class-region","name":"wait_any","signature":"region.wait_any(templates, timeout, threshold, rate)","description":"Wait until any template in the list disappears from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match states when at least one template is no longer found.","example":"watch = [\"loading\", \"syncing\"]\nresult = region.wait_any(watch, 10000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-creation-method-wait-all","kind":"CREATION_METHOD","parentKey":"class-region","name":"wait_all","signature":"region.wait_all(templates, timeout, threshold, rate)","description":"Wait until all templates in the list disappear from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match states when all templates are no longer found.","example":"watch = [\"loading\", \"syncing\"]\nresult = region.wait_all(watch, 10000)\nMacroPanel.notify(str(result))","aliases":[],"group":"FLOW"},{"key":"class-region-creation-method-capture","kind":"CREATION_METHOD","parentKey":"class-region","name":"capture","signature":"region.capture(name=None)","description":"Capture the screen and crop to this region, then return the result as a Template.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String?","defaultValue":"None","description":"Optional template name to save into current macro immediately.","suggestAsNamedArg":true}],"returnType":"Template","returnDescription":"Captured template object.","example":"sample = Region(120, 280, 220, 120).capture()\nsaved = sample.save_as(\"buttons/top/enemy_slot\")","aliases":[],"group":"FLOW"},{"key":"class-region-creation-method-left","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-right","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-top","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-bottom","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-horizontal","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total horizontal shrink: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-vertical","kind":"CREATION_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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total vertical shrink: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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-creation-method-middle","kind":"CREATION_METHOD","parentKey":"class-region","name":"middle","signature":"region.middle(value=0.5)","description":"Shrink both width and height toward the center.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount for both axes: 0 -> 1 means ratio per axis, >1 means pixels per axis.","suggestAsNamedArg":true}],"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-creation-method-highlight","kind":"CREATION_METHOD","parentKey":"class-region","name":"highlight","signature":"region.highlight(color=\"green\", line_width=2, auto_hide_ms=0, movable=False)","description":"Draw a highlighted rectangle for this region. With movable=True, the user can drag the region and the same Region object receives the updated screen coordinates. Re-highlighting the same region instance replaces the previous one.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Stroke thickness in dp.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide after N milliseconds. 0 disables auto-hide.","suggestAsNamedArg":true},{"name":"movable","type":"Boolean","defaultValue":"False","description":"Allow dragging the highlighted region and write the moved coordinates back into this Region.","suggestAsNamedArg":true}],"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-creation-method-highlight-off","kind":"CREATION_METHOD","parentKey":"class-region","name":"highlight_off","signature":"region.highlight_off()","description":"Turn off highlight for this region instance.","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-region-static-method-highlighted","kind":"STATIC_METHOD","parentKey":"class-region","name":"highlighted","signature":"Region.highlighted()","description":"Get all regions currently highlighted by script instances.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Region","returnDescription":"Screen-sized region from the runtime host.","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.","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.","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.","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, threshold, rate)","description":"Scan inside this region until one template match is found or timeout is reached. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"First successful match, or found=false when timed out.","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, threshold, rate)","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"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, threshold, rate)","description":"Scan this region and return when any template in the list is found. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match results when any template is found, or empty list on 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, threshold, rate)","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match results when all templates are found, or empty list on 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":"Scan this region for one target color using the same raw-frame RGB tolerance rule as UI color recognition. The best point is selected by the smallest max RGB channel delta.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":null,"description":"Target color.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; find_color returns at most one point.","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":"Scan this region for multiple target colors. Each input color contributes at most one best point, ordered by the input color list.","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},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; one best point per found input color.","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":"Scan this region for multiple sampled positions of one target color. Passing a list or tuple is rejected so this does not silently become multi-target color search.","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},{"name":"timeout","type":"Number","defaultValue":"0","description":"Maximum wait time in milliseconds. 0 performs one scan pass.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel RGB delta from 0 to 255.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3","description":"Scan attempts per second while waiting.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"10","description":"Sampling step in pixels.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Match with point as list[Point]; matching sampled points are sorted with the closest color first.","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, threshold, rate)","description":"Wait until the template disappears from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"template","type":"String | Template","defaultValue":null,"description":"Template name, relative folder path, or a Template object in current macro.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Latest match state when the template disappears or timeout is reached.","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, threshold, rate)","description":"Wait until any template in the list disappears from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match states when at least one template is no longer found.","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, threshold, rate)","description":"Wait until all templates in the list disappear from this region. If timeout is omitted, only one scan pass is performed.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"templates","type":"list[String | Template]","defaultValue":null,"description":"Template names or Template objects.","suggestAsNamedArg":true},{"name":"timeout","type":"Number","defaultValue":"None","description":"Maximum wait time in milliseconds. Omit this argument to scan only once.","suggestAsNamedArg":true},{"name":"threshold","type":"Number","defaultValue":"0.7","description":"Match threshold from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"rate","type":"Number","defaultValue":"3.0","description":"Scan attempts per second (1-60).","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Batch match states when all templates are no longer found.","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 the screen and crop to this region, then return the result as a Template.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String?","defaultValue":"None","description":"Optional template name to save into current macro immediately.","suggestAsNamedArg":true}],"returnType":"Template","returnDescription":"Captured template object.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total horizontal shrink: 0 -> 1 means ratio of current width, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Total vertical shrink: 0 -> 1 means ratio of current height, >1 means pixels.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Number","defaultValue":"0.5","description":"Shrink amount for both axes: 0 -> 1 means ratio per axis, >1 means pixels per axis.","suggestAsNamedArg":true}],"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 highlighted rectangle for this region. With movable=True, the user can drag the region and the same Region object receives the updated screen coordinates. Re-highlighting the same region instance replaces the previous one.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Stroke thickness in dp.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide after N milliseconds. 0 disables auto-hide.","suggestAsNamedArg":true},{"name":"movable","type":"Boolean","defaultValue":"False","description":"Allow dragging the highlighted region and write the moved coordinates back into this Region.","suggestAsNamedArg":true}],"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":"Turn off highlight for this region instance.","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":"Template image wrapper. You can scale/crop an existing template, save it as a new template name, or check existence.","isCallable":true,"fields":["name"],"fieldDocs":[{"name":"name","type":"String?","defaultValue":null,"description":"Template name or relative folder path when this object points to a named template in current macro.","suggestAsNamedArg":true}],"constants":[{"name":"name","type":"String","defaultValue":null,"description":"Template name or relative folder path to check.","suggestAsNamedArg":true}],"constructorParams":[{"name":"name","type":"String","defaultValue":null,"description":"Template name in current macro, optionally as a relative folder path such as \"buttons/top/attack\".","suggestAsNamedArg":false}],"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.","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}],"returnType":"Boolean","returnDescription":"true if the template exists.","example":"if Template.exists(\"enemy_head\"):\n    text(\"ready\")","aliases":[],"group":"FLOW"},{"key":"class-template-method-exists","kind":"METHOD","parentKey":"class-template","name":"exists","signature":"template.exists()","description":"Check whether this Template object still points to an existing file.","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":"Create a scaled template copy and return it as another Template object.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"scale","type":"Number","defaultValue":null,"description":"Scale factor for X axis (and Y axis when scale_y is omitted).","suggestAsNamedArg":true},{"name":"scale_y","type":"Number","defaultValue":"scale","description":"Optional Y-axis scale factor.","suggestAsNamedArg":true}],"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":"Crop this template by a region in template-local pixels and return a new Template object.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"region","type":"Region","defaultValue":null,"description":"Crop region in template-local coordinates.","suggestAsNamedArg":true}],"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 this template object into current macro templates using a new name or relative folder path.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"New template name, optionally including folders such as \"buttons/top/attack\".","suggestAsNamedArg":true}],"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.","isCallable":false,"fields":["result"],"fieldDocs":[{"name":"result","type":"Match | MatchList","defaultValue":null,"description":"The active recognition result for this Success branch.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[],"fieldExample":"current = Recognition.result\nif current.found:\n    click(current, random=0)","constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"# Recognition chỉ có sẵn trong Python của nhánh Thành công nhận diện.\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-only recognition match result returned by region.find* helpers. In a recognition Success branch, Recognition.result points to the active Match or MatchList.","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},{"name":"found","type":"Boolean","defaultValue":null,"description":"Whether a match was found.","suggestAsNamedArg":true},{"name":"confidence","type":"Number","defaultValue":null,"description":"Confidence score from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"conf","type":"Number","defaultValue":null,"description":"Alias of confidence; returns the same score from 0.0 to 1.0.","suggestAsNamedArg":true},{"name":"point","type":"Point? | list[Point]","defaultValue":null,"description":"Match point. Image/OCR/object recognition usually returns Point; image matches below threshold can still return the best candidate point when bounds are available. Color and multi-target recognition can return list[Point] so match.point[0].x/y works for the best point.","suggestAsNamedArg":true},{"name":"bounds","type":"Region?","defaultValue":null,"description":"Bounding box of the matched area. Image matches below threshold can still expose the best candidate bounds.","suggestAsNamedArg":true},{"name":"region","type":"Region?","defaultValue":null,"description":"Alias of bounds; returns the same matched Region or None.","suggestAsNamedArg":true},{"name":"inference_info","type":"dict?","defaultValue":null,"description":"Model or color metadata when available. TFLite metadata includes backend, class_id, class_name, preprocess_ms, inference_ms, postprocess_ms, total_ms, input_width, input_height, optional debug image dimensions, and capture telemetry. Detailed debug_result rows are shown only in the inference debug dialog. Color metadata includes backend=color, target_color, sampled_color, point, max_channel_delta, confidence, interval, match_count, and matches.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[],"fieldExample":"m = 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\ninfo_class_id = info.class_id\ninfo_class_name = info.class_name\n\ncolor_hit = Region(0, 0, 1080, 1920).find_color(\"#FFFFFF\", tolerance=4)\ncolor_name = color_hit.name\nfirst_color_point = color_hit.point[0]\n\n# Trong nhánh Thành công của nhận diện:\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 chỉ có sẵn trong Python của nhánh Thành công nhận diện.\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":"Draw a highlight frame for this match when found=true. Uses bounds first; when bounds is missing, draws one square for each point in point/list.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline width in pixels.","suggestAsNamedArg":true},{"name":"region_width","type":"Number","defaultValue":"36","description":"Fallback square width when the match only has point.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide timeout in milliseconds. 0 keeps highlight visible.","suggestAsNamedArg":true}],"returnType":"Match","returnDescription":"Returns the same match after drawing highlight.","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.","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":"A read-only list of Match values returned by region.find_any/find_all/find_multi, wait_any/wait_all, and Recognition.result when multiple recognition targets matched.","isCallable":false,"fields":[],"fieldDocs":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline width in pixels.","suggestAsNamedArg":true},{"name":"region_width","type":"Number","defaultValue":"36","description":"Fallback square width when a match has point only.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide timeout in milliseconds. 0 keeps highlight visible.","suggestAsNamedArg":true}],"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":"Draw highlight frames for each found match in this list. Items without a valid match point/bounds are skipped.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"color","type":"Color | String | Number","defaultValue":"green","description":"Highlight color.","suggestAsNamedArg":true},{"name":"line_width","type":"Number","defaultValue":"2","description":"Outline width in pixels.","suggestAsNamedArg":true},{"name":"region_width","type":"Number","defaultValue":"36","description":"Fallback square width when a match has point only.","suggestAsNamedArg":true},{"name":"auto_hide_ms","type":"Number","defaultValue":"0","description":"Auto-hide timeout in milliseconds. 0 keeps highlight visible.","suggestAsNamedArg":true}],"returnType":"MatchList","returnDescription":"Returns the same match list after drawing highlights.","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.","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":"Represents one ARGB color and provides color sampling/comparison helpers.","isCallable":true,"fields":["argb","a","r","g","b","hex"],"fieldDocs":[{"name":"argb","type":"Number","defaultValue":null,"description":"Raw ARGB integer value.","suggestAsNamedArg":true},{"name":"a","type":"Int","defaultValue":null,"description":"Alpha channel 0-255.","suggestAsNamedArg":true},{"name":"r","type":"Int","defaultValue":null,"description":"Red channel 0-255.","suggestAsNamedArg":true},{"name":"g","type":"Int","defaultValue":null,"description":"Green channel 0-255.","suggestAsNamedArg":true},{"name":"b","type":"Int","defaultValue":null,"description":"Blue channel 0-255.","suggestAsNamedArg":true},{"name":"hex","type":"String","defaultValue":null,"description":"Hex string `#AARRGGBB`.","suggestAsNamedArg":true}],"constants":[{"name":"target","type":"Point | Region | list[Point]","defaultValue":null,"description":"Sampling target.","suggestAsNamedArg":true},{"name":"interval","type":"Number","defaultValue":"3","description":"Grid step (pixels) when target is Region.","suggestAsNamedArg":true},{"name":"default","type":"Color | String | Number","defaultValue":"#00000000","description":"Fallback color returned when screen capture or pixel sampling is unavailable.","suggestAsNamedArg":true},{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel difference (0-255). Practical start: 4-8 for near-identical UI shades, 10-16 for anti-alias/compression variation.","suggestAsNamedArg":true},{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true},{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true}],"constructorParams":[{"name":"value","type":"String | Number","defaultValue":null,"description":"Hex string (`#AARRGGBB`/`#RRGGBB`) or raw ARGB number.","suggestAsNamedArg":false}],"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":"Read color(s) from screen: Point -> Color, Region -> 2D Color array, list[Point] -> Color list. This is an immediate one-shot sample; if no frame is available or a sample is missing, returns the default color instead of retrying or stopping the script.","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},{"name":"interval","type":"Number","defaultValue":"3","description":"Grid step (pixels) when target is Region.","suggestAsNamedArg":true},{"name":"default","type":"Color | String | Number","defaultValue":"#00000000","description":"Fallback color returned when screen capture or pixel sampling is unavailable.","suggestAsNamedArg":true}],"returnType":"Color | list[list[Color]] | list[Color]","returnDescription":"Sampled color payload based on target type, with missing samples filled by default.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel difference (0-255). Practical start: 4-8 for near-identical UI shades, 10-16 for anti-alias/compression variation.","suggestAsNamedArg":true}],"returnType":"Boolean","returnDescription":"true when all RGB channels are within tolerance. Quick guide: 0 = exact, 4-8 = almost same, 10-16 = tolerant match, >24 = very loose.","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":"Compute Euclidean distance in RGB space between two colors.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true}],"returnType":"Number","returnDescription":"RGB-space distance in range 0 -> 441.67 (0 = exact). Practical guide: <=8 almost same, 9-20 close, 21-40 visibly different, >40 far apart.","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":"Compute CIE76 Delta E between two colors for perceptual difference.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a","type":"Color | String | Number","defaultValue":null,"description":"First color.","suggestAsNamedArg":true},{"name":"b","type":"Color | String | Number","defaultValue":null,"description":"Second color.","suggestAsNamedArg":true}],"returnType":"Number","returnDescription":"Perceptual difference score. Rule of thumb: <1 imperceptible, 1-2 barely noticeable, 2-5 noticeable, 5-10 clearly different, >10 different colors.","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":"Instance version of RGB tolerance compare. Useful when you already sampled one color and compare against target shades.","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},{"name":"tolerance","type":"Number","defaultValue":"0","description":"Allowed per-channel difference (0-255). Typical same-ish range: 4-8; use 10-16 for noisy/compressed captures.","suggestAsNamedArg":true}],"returnType":"Boolean","returnDescription":"Comparison result. 0 means exact match; larger tolerance makes matching more permissive.","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":"Compute Euclidean distance in RGB space from this color to another color.","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}],"returnType":"Number","returnDescription":"RGB-space distance (0 -> 441.67). Quick read: <=8 almost same, 9-20 close, 21-40 visibly different, >40 far apart.","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":"Compute CIE76 Delta E from this color to another color for perceptual comparison.","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}],"returnType":"Number","returnDescription":"Perceptual color difference score. Practical guide: <1 imperceptible, 1-2 barely visible, 2-5 noticeable, 5-10 clear difference, >10 very different.","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":"Draw text on top of the screen with optional interaction tracking (press/move/hold). Setter names such as text/background are methods; read current values through state().","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},{"name":"y","type":"Number","defaultValue":"0","description":"Top-left Y position in pixels. Writable before show().","suggestAsNamedArg":true},{"name":"scale","type":"String","defaultValue":"fixed","description":"Coordinate scale copied from Point positions.","suggestAsNamedArg":true},{"name":"anchor","type":"String","defaultValue":"none","description":"Coordinate anchor copied from Point positions.","suggestAsNamedArg":true},{"name":"argb","type":"Color","defaultValue":"white","description":"Text color. Assign with Color/string/number values. Use overlay.color(value) for method chaining.","suggestAsNamedArg":true},{"name":"size_sp","type":"Number","defaultValue":"16","description":"Text size in sp. Use overlay.size(sp) for method chaining.","suggestAsNamedArg":true}],"constants":[],"constructorParams":[{"name":"text","type":"String","defaultValue":"\"\"","description":"Initial text content.","suggestAsNamedArg":true},{"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},{"name":"color","type":"Color | String | Number","defaultValue":"white","description":"Initial text color.","suggestAsNamedArg":true},{"name":"size","type":"Number","defaultValue":"16","description":"Initial text size (sp).","suggestAsNamedArg":true},{"name":"background","type":"Color | String | Number | None","defaultValue":"None","description":"Initial background color. None means transparent/no background.","suggestAsNamedArg":true}],"fieldExample":null,"constructorExample":"badge = OverlayText(\"Ready\", Point(420, 220, scale=\"width\", anchor=\"top\"), background=None)","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 script-created overlay text.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-text","kind":"METHOD","parentKey":"class-overlaytext","name":"text","signature":"overlay.text(value)","description":"Update displayed text content.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"String","defaultValue":null,"description":"Text content.","suggestAsNamedArg":true}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-color","kind":"METHOD","parentKey":"class-overlaytext","name":"color","signature":"overlay.color(value)","description":"Update text color.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Color | String | Number","defaultValue":null,"description":"Color value.","suggestAsNamedArg":true}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-background","kind":"METHOD","parentKey":"class-overlaytext","name":"background","signature":"overlay.background(value)","description":"Update background color. Passing None removes the background.","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}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-size","kind":"METHOD","parentKey":"class-overlaytext","name":"size","signature":"overlay.size(sp)","description":"Update text size (sp).","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sp","type":"Number","defaultValue":null,"description":"Text size in sp.","suggestAsNamedArg":true}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"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.","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}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"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 interaction tracking. If all flags are False, the text stays fixed at declared position.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"press","type":"Boolean","defaultValue":"False","description":"Track press/release state.","suggestAsNamedArg":true},{"name":"move","type":"Boolean","defaultValue":"False","description":"Allow user drag to move text.","suggestAsNamedArg":true},{"name":"hold","type":"Boolean","defaultValue":"False","description":"Track hold state.","suggestAsNamedArg":true},{"name":"hold_ms","type":"Number","defaultValue":"600","description":"Hold threshold to treat interaction as holding, measured in milliseconds.","suggestAsNamedArg":true}],"returnType":"OverlayText","returnDescription":"Returns the same overlay text builder.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Point","returnDescription":"Current overlay position in screen pixels.","example":null,"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.","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":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-show","kind":"METHOD","parentKey":"class-overlaytext","name":"show","signature":"overlay.show()","description":"Show text overlay (or show again after hide()).","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-hide","kind":"METHOD","parentKey":"class-overlaytext","name":"hide","signature":"overlay.hide()","description":"Hide overlay text but keep cached view for faster show().","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"Current overlay state dictionary.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-overlaytext-method-state","kind":"METHOD","parentKey":"class-overlaytext","name":"state","signature":"overlay.state()","description":"Return current interaction state. Status map: 0=IDLE, 1=PRESSED, 2=MOVING, 3=HOLDING, 4=RELEASED, 5=HIDDEN, 6=OFF. Reading state() auto-resets PRESSED and RELEASED back to IDLE for the next poll; MOVING and HOLDING do not auto-reset.","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":null,"aliases":[],"group":"FLOW"},{"key":"class-timer","kind":"CLASS","parentKey":null,"name":"Timer","signature":"Timer(auto_start=True)","description":"Millisecond stopwatch helper for script timing checks and guarded waits.","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}],"constants":[{"name":"time","type":"Number","defaultValue":null,"description":"Target milliseconds threshold.","suggestAsNamedArg":true}],"constructorParams":[{"name":"auto_start","type":"Boolean","defaultValue":"True","description":"Start counting immediately after creation.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-timer-method-resume","kind":"METHOD","parentKey":"class-timer","name":"resume","signature":"timer.resume()","description":"Resume counting from paused state.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Timer","returnDescription":"Returns the same timer for chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Elapsed milliseconds.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"time","type":"Number","defaultValue":null,"description":"Target milliseconds threshold.","suggestAsNamedArg":true}],"returnType":"Boolean","returnDescription":"true when elapsed time reached or exceeded the threshold.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true when timer is counting.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true when timer is paused.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-tflitemodel","kind":"CLASS","parentKey":null,"name":"TfliteModel","signature":"TfliteModel(model)","description":"TFLite model handle for scripts. The model type must be selected in Template Manager metadata. Supported outputs are YOLOv8/YOLO11 object detection [1,N,4+C]/[1,4+C,N], YOLO26 end-to-end detection [1,N,6]/[N,6], YOLO11/YOLO26 image classification [1,C], and MobileNetV3 image classification [1,C]. Runtime detects FLOAT32, INT8, or UINT8 tensor precision from the model and dequantizes quantized detection and classification outputs before applying thresholds. Classification matches return class confidence and metadata without point or bounds. Inference methods require a local model file; when local file is missing and runtime download fails, script raises a runtime error.","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},{"name":"resize_mode","type":"String","defaultValue":"LETTERBOX","description":"Resolved preprocessing resize mode: LETTERBOX, STRETCH, or CROP_CENTER.","suggestAsNamedArg":true},{"name":"color_mode","type":"String","defaultValue":"RGB","description":"Resolved preprocessing color mode: RGB, BGR, or GRAYSCALE.","suggestAsNamedArg":true},{"name":"norm_mode","type":"String","defaultValue":"ZERO_ONE","description":"Resolved preprocessing normalization: ZERO_ONE, MINUS_ONE_ONE, IMAGENET, or CUSTOM.","suggestAsNamedArg":true},{"name":"padding_color","type":"Int","defaultValue":"114","description":"Padding fill value (0 -> 255) used by LETTERBOX resize mode.","suggestAsNamedArg":true}],"constants":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference to check.","suggestAsNamedArg":true}],"constructorParams":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference to use for inference (prefer template model name).","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"model","type":"String","defaultValue":null,"description":"Model reference to check.","suggestAsNamedArg":true}],"returnType":"Boolean","returnDescription":"true if local model file is ready to use.","example":null,"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).","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list[String]","returnDescription":"Model reference list.","example":null,"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.","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":null,"aliases":[],"group":"FLOW"},{"key":"class-tflitemodel-method-inference","kind":"METHOD","parentKey":"class-tflitemodel","name":"inference","signature":"model.inference(threshold, region, max_results, debug)","description":"Run the selected TFLite model without class filtering and return all matches. When region is supplied, its screen image is cropped before preprocessing and inference; this can reduce model accuracy if the model was not trained on similarly cropped images. Classification matches have no point or bounds.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"threshold","type":"Number","defaultValue":"0.5","description":"Confidence threshold in 0 -> 1.","suggestAsNamedArg":true},{"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},{"name":"max_results","type":"Int","defaultValue":"8","description":"Maximum number of detections returned.","suggestAsNamedArg":true},{"name":"debug","type":"Boolean","defaultValue":"False","description":"In Edit mode, true saves a preprocess preview and opens the runtime debug dialog. Run-only mode ignores the debug output and performs normal inference without a dialog. Detailed model-result rows and preprocess config stay in the dialog; returned Match objects do not include debug_result. Detection previews draw bbox/class labels; classification previews show the preprocessed input plus class scores.","suggestAsNamedArg":true}],"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-list","kind":"COLLECTION","parentKey":null,"name":"list","signature":"list(iterable=(), /)","description":"An ordered collection you can create, read, loop through, destructure, and update while the script runs.","isCallable":true,"fields":[],"fieldDocs":[{"name":"iterable","type":"Iterable","defaultValue":"()","description":"Source values to copy into the new list.","suggestAsNamedArg":false},{"name":"item","type":"Any?","defaultValue":null,"description":"Each item written inside the brackets.","suggestAsNamedArg":true},{"name":"expr","type":"Any?","defaultValue":null,"description":"Value to append for each accepted item.","suggestAsNamedArg":true},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before appending.","suggestAsNamedArg":true},{"name":"start","type":"Number","defaultValue":"0","description":"Start value (inclusive).","suggestAsNamedArg":false},{"name":"stop","type":"Number","defaultValue":null,"description":"End value (exclusive).","suggestAsNamedArg":false},{"name":"step","type":"Number","defaultValue":"1","description":"Increment between items. Cannot be 0.","suggestAsNamedArg":false}],"constants":[{"name":"list","type":"list","defaultValue":null,"description":"The list to count.","suggestAsNamedArg":false},{"name":"list","type":"list","defaultValue":null,"description":"The source list.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Item index. Use -1 for the last item.","suggestAsNamedArg":true},{"name":"start","type":"Int","defaultValue":"start of list","description":"First item index to include.","suggestAsNamedArg":true},{"name":"end","type":"Int","defaultValue":"end of list","description":"Stop before this item index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true},{"name":"list","type":"list","defaultValue":null,"description":"The mutable list to update.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Item index that already exists. Use -1 for the last item.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"New value to store at that position.","suggestAsNamedArg":true},{"name":"a, b","type":"Targets","defaultValue":null,"description":"Assignment targets matching the list item count.","suggestAsNamedArg":true},{"name":"list","type":"list","defaultValue":null,"description":"Source list to unpack.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"The value to add.","suggestAsNamedArg":false},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values whose items will be appended.","suggestAsNamedArg":false},{"name":"index","type":"Int","defaultValue":null,"description":"Position before which the value is inserted.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"The value to insert.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to find and remove from the list.","suggestAsNamedArg":false},{"name":"index","type":"Int","defaultValue":"-1","description":"Optional index to remove. Negative indexes count from the end.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to search for.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Optional start bound. Negative values count from the end.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(list)","description":"Optional stop bound. The item at this index is not included.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false},{"name":"key","type":"Callable?","defaultValue":"None","description":"Optional function that returns the comparison key for each item.","suggestAsNamedArg":true},{"name":"reverse","type":"Boolean","defaultValue":"False","description":"When true, sort from largest to smallest.","suggestAsNamedArg":true},{"name":"item","type":"Any","defaultValue":null,"description":"Current item inside the loop.","suggestAsNamedArg":true},{"name":"list","type":"list","defaultValue":null,"description":"The list to iterate.","suggestAsNamedArg":true},{"name":"list","type":"list","defaultValue":null,"description":"The list used in the condition.","suggestAsNamedArg":true}],"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 copy the items from one iterable into a new mutable list.","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}],"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 literal inline. This is the shortest form when you already know the items.","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}],"returnType":"list","returnDescription":"A new mutable list preserving the literal 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 by looping through another iterable. Multiple for/if clauses are supported, and loop targets stay local to the comprehension.","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},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before appending.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Number","defaultValue":"0","description":"Start value (inclusive).","suggestAsNamedArg":false},{"name":"stop","type":"Number","defaultValue":null,"description":"End value (exclusive).","suggestAsNamedArg":false},{"name":"step","type":"Number","defaultValue":"1","description":"Increment between items. Cannot be 0.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The list to count.","suggestAsNamedArg":false}],"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 index. Negative indexes count from the end.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"list","type":"list","defaultValue":null,"description":"The source list.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Item index. Use -1 for the last item.","suggestAsNamedArg":true}],"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":"Copy part of a list using Python-style slicing. Omitted bounds use the start or end; negative indexes count from the end.","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},{"name":"end","type":"Int","defaultValue":"end of list","description":"Stop before this item index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true}],"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.","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},{"name":"index","type":"Int","defaultValue":null,"description":"Item index that already exists. Use -1 for the last item.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"New value to store at that position.","suggestAsNamedArg":true}],"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":"Unpack list items into matching assignment targets. Nested targets are supported, but starred targets such as *rest are not supported.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"a, b","type":"Targets","defaultValue":null,"description":"Assignment targets matching the list item count.","suggestAsNamedArg":true},{"name":"list","type":"list","defaultValue":null,"description":"Source list to unpack.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"The value to add.","suggestAsNamedArg":false}],"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":"Append every item from another iterable to the end of the current list.","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}],"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 one item before the given index. Negative and oversized indexes are clamped like Python.","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},{"name":"value","type":"Any?","defaultValue":null,"description":"The value to insert.","suggestAsNamedArg":false}],"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.","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}],"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.","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}],"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.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to search for.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Optional start bound. Negative values count from the end.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(list)","description":"Optional stop bound. The item at this index is not included.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false}],"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":"Sort the list in place using the same stable ordering rules as sorted().","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Callable?","defaultValue":"None","description":"Optional function that returns the comparison key for each item.","suggestAsNamedArg":true},{"name":"reverse","type":"Boolean","defaultValue":"False","description":"When true, sort from largest to smallest.","suggestAsNamedArg":true}],"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.","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":"Create a shallow mutable copy of the list.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A new mutable list with the same item references.","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.","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},{"name":"list","type":"list","defaultValue":null,"description":"The list to iterate.","suggestAsNamedArg":true}],"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.","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}],"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":"An ordered read-only collection. Use tuple literals when values should stay fixed after creation or when returning grouped values for destructuring.","isCallable":true,"fields":[],"fieldDocs":[{"name":"iterable","type":"Iterable","defaultValue":"None","description":"Optional iterable to clone into a tuple.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Each item written inside tuple parentheses.","suggestAsNamedArg":true}],"constants":[{"name":"tuple","type":"tuple","defaultValue":null,"description":"The tuple to count.","suggestAsNamedArg":false},{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Item index. Use -1 for the last item.","suggestAsNamedArg":true},{"name":"start","type":"Int","defaultValue":"start of tuple","description":"First item index to include.","suggestAsNamedArg":true},{"name":"end","type":"Int","defaultValue":"end of tuple","description":"Stop before this item index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true},{"name":"x, y","type":"Targets","defaultValue":null,"description":"Assignment targets matching the tuple item count.","suggestAsNamedArg":true},{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple to unpack.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value that must exist in the tuple.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(tuple)","description":"Stop index for the search.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false},{"name":"item","type":"Any","defaultValue":null,"description":"Current tuple item in loop.","suggestAsNamedArg":true},{"name":"tuple","type":"tuple","defaultValue":null,"description":"tuple to iterate.","suggestAsNamedArg":true}],"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 clone another iterable as tuple. Use a tuple literal for multiple inline values.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":"None","description":"Optional iterable to clone into a tuple.","suggestAsNamedArg":false}],"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 inline using parentheses and commas.","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}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"tuple","type":"tuple","defaultValue":null,"description":"The tuple to count.","suggestAsNamedArg":false}],"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 index. Negative indexes count from the end.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Item index. Use -1 for the last item.","suggestAsNamedArg":true}],"returnType":"Any?","returnDescription":"tuple item at index, or None when out of range.","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":"Copy part of a tuple using Python-style slicing. Omitted bounds use the start or end; negative indexes count from the end.","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},{"name":"end","type":"Int","defaultValue":"end of tuple","description":"Stop before this item index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between items. Cannot be 0; negative values read backward.","suggestAsNamedArg":true}],"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":"Unpack tuple items into matching assignment targets. Nested targets are supported, but starred targets such as *rest are not supported.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"x, y","type":"Targets","defaultValue":null,"description":"Assignment targets matching the tuple item count.","suggestAsNamedArg":true},{"name":"tuple","type":"tuple","defaultValue":null,"description":"Source tuple to unpack.","suggestAsNamedArg":true}],"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":"Find the first matching item index and fail visibly when absent.","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},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(tuple)","description":"Stop index for the search.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to count.","suggestAsNamedArg":false}],"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.","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},{"name":"tuple","type":"tuple","defaultValue":null,"description":"tuple to iterate.","suggestAsNamedArg":true}],"returnType":"None","returnDescription":"No direct return value.","example":"offset = (0, 1)\nfor item in offset:\n    text(str(item))","aliases":[],"group":"FLOW"},{"key":"class-set","kind":"COLLECTION","parentKey":null,"name":"set","signature":"set(iterable=None, /)","description":"A mutable collection of unique values. CogniTab keeps iteration order stable so script output is easy to read.","isCallable":true,"fields":[],"fieldDocs":[{"name":"iterable","type":"Iterable","defaultValue":"None","description":"Optional source values to deduplicate into the new set.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Each value written inside the braces.","suggestAsNamedArg":true},{"name":"expr","type":"Any?","defaultValue":null,"description":"Value calculated for each accepted item.","suggestAsNamedArg":true},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before adding a value.","suggestAsNamedArg":true}],"constants":[{"name":"set","type":"set","defaultValue":null,"description":"The set to count.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to test.","suggestAsNamedArg":true},{"name":"set","type":"set","defaultValue":null,"description":"Set used for membership.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to add.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to remove if present.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Value that must exist in the set.","suggestAsNamedArg":false},{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to add.","suggestAsNamedArg":false},{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to merge.","suggestAsNamedArg":false},{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to compare.","suggestAsNamedArg":false},{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to subtract.","suggestAsNamedArg":false},{"name":"value","type":"Any?","defaultValue":null,"description":"Current set value in the loop.","suggestAsNamedArg":true},{"name":"set","type":"set","defaultValue":null,"description":"set to iterate.","suggestAsNamedArg":true},{"name":"set","type":"set","defaultValue":null,"description":"The set used in the condition.","suggestAsNamedArg":true}],"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 unique values from another iterable, including a generator expression.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"Iterable","defaultValue":"None","description":"Optional source values to deduplicate into the new set.","suggestAsNamedArg":true}],"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 literal inline. Use dict() or {} for an empty dictionary; use set() for an empty set.","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}],"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 by looping through an iterable and keeping unique calculated values. Multiple for/if clauses are supported.","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},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before adding a value.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"set","type":"set","defaultValue":null,"description":"The set to count.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to test.","suggestAsNamedArg":true},{"name":"set","type":"set","defaultValue":null,"description":"Set used for membership.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any?","defaultValue":null,"description":"Value to add.","suggestAsNamedArg":false}],"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.","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}],"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 an existing value. Missing values raise a runtime error so mistakes are visible.","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}],"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 one value from the set. Empty sets raise a runtime error.","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 one or more iterables into the set.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to add.","suggestAsNamedArg":false}],"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 with values from this set and the provided iterables.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to merge.","suggestAsNamedArg":false}],"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 that also exist in every provided iterable.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to compare.","suggestAsNamedArg":false}],"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 without values found in the provided iterables.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"Iterable","defaultValue":null,"description":"Sources to subtract.","suggestAsNamedArg":false}],"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":"Copy the set into a new mutable set.","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.","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":"Iterate values in stable insertion order.","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},{"name":"set","type":"set","defaultValue":null,"description":"set to iterate.","suggestAsNamedArg":true}],"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.","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}],"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":"A key/value collection that keeps insertion order and can be read or updated during script execution.","isCallable":true,"fields":[],"fieldDocs":[{"name":"mapping_or_pairs","type":"dict | Iterable","defaultValue":"None","description":"Mapping or iterable of two-item pairs to copy.","suggestAsNamedArg":false},{"name":"key=value","type":"Any?","defaultValue":null,"description":"Keyword entries to add after the source mapping.","suggestAsNamedArg":true},{"name":"key","type":"String","defaultValue":null,"description":"dict key.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true},{"name":"key","type":"Any","defaultValue":null,"description":"dict key calculated for each accepted item.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before storing an entry.","suggestAsNamedArg":true}],"constants":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The source dictionary.","suggestAsNamedArg":true},{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":true},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The mutable dictionary to update.","suggestAsNamedArg":true},{"name":"key","type":"Any","defaultValue":null,"description":"Key to write or replace.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to store for that key.","suggestAsNamedArg":true},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to count.","suggestAsNamedArg":false},{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":false},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback value returned when the key is missing.","suggestAsNamedArg":false},{"name":"key","type":"Any","defaultValue":null,"description":"Key to remove.","suggestAsNamedArg":false},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback returned when the key is missing.","suggestAsNamedArg":false},{"name":"other","type":"dict | Iterable","defaultValue":"None","description":"Mapping or pairs to merge.","suggestAsNamedArg":false},{"name":"items","type":"Any?","defaultValue":null,"description":"Keyword entries to write.","suggestAsNamedArg":false},{"name":"key","type":"Any","defaultValue":null,"description":"Key to read or create.","suggestAsNamedArg":false},{"name":"default","type":"Any?","defaultValue":"None","description":"Value stored when the key is absent.","suggestAsNamedArg":false},{"name":"key","type":"Any","defaultValue":null,"description":"Current key inside the loop.","suggestAsNamedArg":true},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to iterate.","suggestAsNamedArg":true},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary used in the condition.","suggestAsNamedArg":true}],"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, copy a mapping or iterable of pairs, or build entries from keyword arguments.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"mapping_or_pairs","type":"dict | Iterable","defaultValue":"None","description":"Mapping or iterable of two-item pairs to copy.","suggestAsNamedArg":false},{"name":"key=value","type":"Any?","defaultValue":null,"description":"Keyword entries to add after the source mapping.","suggestAsNamedArg":true}],"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 with string, number, boolean, or object values.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"String","defaultValue":null,"description":"dict key.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true}],"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 an iterable while preserving insertion order. Multiple for/if clauses are supported.","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},{"name":"value","type":"Any?","defaultValue":null,"description":"Value stored for that key.","suggestAsNamedArg":true},{"name":"target","type":"Name | destructuring target","defaultValue":null,"description":"Loop target for the current item. Starred targets are not supported.","suggestAsNamedArg":true},{"name":"iterable","type":"Iterable","defaultValue":null,"description":"Source values to loop through.","suggestAsNamedArg":true},{"name":"condition","type":"Boolean","defaultValue":"True","description":"Optional filter checked before storing an entry.","suggestAsNamedArg":true}],"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 one value by key. Missing keys return None.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The source dictionary.","suggestAsNamedArg":true},{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":true}],"returnType":"Any?","returnDescription":"The stored value for that key, or None when the key is absent.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nmode = settings[\"mode\"]        # returns farm\nmissing = settings[\"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.","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},{"name":"key","type":"Any","defaultValue":null,"description":"Key to write or replace.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to store for that key.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to count.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":false},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback value returned when the key is missing.","suggestAsNamedArg":false}],"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":"Get key/value pairs as a list of two-item tuples in insertion order.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A list of (key, value) tuples.","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, default=None, /)","description":"Remove one key and return its value, or return the default when missing.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to remove.","suggestAsNamedArg":false},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback returned when the key is missing.","suggestAsNamedArg":false}],"returnType":"Any?","returnDescription":"Removed value or fallback default.","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":"Copy the dictionary into a new mutable dictionary.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"A new dictionary with the same entries.","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":"Update this dictionary from another mapping, pairs iterable, and keyword entries.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"other","type":"dict | Iterable","defaultValue":"None","description":"Mapping or pairs to merge.","suggestAsNamedArg":false},{"name":"items","type":"Any?","defaultValue":null,"description":"Keyword entries to write.","suggestAsNamedArg":false}],"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.","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},{"name":"default","type":"Any?","defaultValue":"None","description":"Value stored when the key is absent.","suggestAsNamedArg":false}],"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":"Get the dictionary keys as a list in insertion order.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A list of keys.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nkeys = settings.keys()\nfirst_key = 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":"Get the dictionary values as a list in insertion order.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"list","returnDescription":"A list of values.","example":"settings = {\"mode\": \"farm\", \"retries\": 3}\nvalues = settings.values()\nlast_value = 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.","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 the same order they were written in the literal.","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},{"name":"dictionary","type":"dict","defaultValue":null,"description":"The dictionary to iterate.","suggestAsNamedArg":true}],"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.","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}],"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":"Text value collection. Created by string literals or str(value), then read by length/index/loop operations.","isCallable":false,"fields":[],"fieldDocs":[{"name":"text","type":"String","defaultValue":null,"description":"String content between quotes.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to convert into text.","suggestAsNamedArg":false}],"constants":[{"name":"string","type":"String","defaultValue":null,"description":"String value to count.","suggestAsNamedArg":false},{"name":"string","type":"String","defaultValue":null,"description":"Source string.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Character index. Use -1 for the last character.","suggestAsNamedArg":true},{"name":"start","type":"Int","defaultValue":"start of string","description":"First character index to include.","suggestAsNamedArg":true},{"name":"end","type":"Int","defaultValue":"end of string","description":"Stop before this character index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between characters. Cannot be 0; negative values read backward.","suggestAsNamedArg":true},{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false},{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false},{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false},{"name":"prefix","type":"String","defaultValue":null,"description":"Prefix to test.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the check.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the check.","suggestAsNamedArg":false},{"name":"suffix","type":"String","defaultValue":null,"description":"Suffix to test.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the check.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the check.","suggestAsNamedArg":false},{"name":"sub","type":"String","defaultValue":null,"description":"Substring to find.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the search.","suggestAsNamedArg":false},{"name":"sub","type":"String","defaultValue":null,"description":"Substring that must exist.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the search.","suggestAsNamedArg":false},{"name":"old","type":"String","defaultValue":null,"description":"Text to replace.","suggestAsNamedArg":false},{"name":"new","type":"String","defaultValue":null,"description":"Replacement text.","suggestAsNamedArg":false},{"name":"count","type":"Int","defaultValue":"-1","description":"Maximum replacements; negative means all.","suggestAsNamedArg":false},{"name":"sep","type":"String?","defaultValue":"None","description":"Separator text. None splits on whitespace.","suggestAsNamedArg":false},{"name":"maxsplit","type":"Int","defaultValue":"-1","description":"Maximum split count; negative means all.","suggestAsNamedArg":false},{"name":"iterable","type":"Iterable<String>","defaultValue":null,"description":"String values to join.","suggestAsNamedArg":false},{"name":"sub","type":"String","defaultValue":null,"description":"Substring to count.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the count.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the count.","suggestAsNamedArg":false},{"name":"ch","type":"String","defaultValue":null,"description":"Current character in the loop.","suggestAsNamedArg":true},{"name":"string","type":"String","defaultValue":null,"description":"String to iterate.","suggestAsNamedArg":true},{"name":"string","type":"String","defaultValue":null,"description":"String used in the condition.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"text","type":"String","defaultValue":null,"description":"String content between quotes.","suggestAsNamedArg":true}],"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 number, boolean, or other value to text. Large or deeply nested structured values use a bounded preview with explicit omission markers, while a direct string remains unchanged.","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}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"string","type":"String","defaultValue":null,"description":"String value to count.","suggestAsNamedArg":false}],"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 index. Negative indexes count from the end.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"string","type":"String","defaultValue":null,"description":"Source string.","suggestAsNamedArg":true},{"name":"index","type":"Int","defaultValue":null,"description":"Character index. Use -1 for the last character.","suggestAsNamedArg":true}],"returnType":"String?","returnDescription":"One-character string, or None if out of range.","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":"Copy a substring using Python-style slicing. Omitted bounds use the start or end; negative indexes count from the end.","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},{"name":"end","type":"Int","defaultValue":"end of string","description":"Stop before this character index.","suggestAsNamedArg":true},{"name":"step","type":"Int","defaultValue":"1","description":"Distance between characters. Cannot be 0; negative values read backward.","suggestAsNamedArg":true}],"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.","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.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"chars","type":"String?","defaultValue":"None","description":"Characters to trim instead of whitespace.","suggestAsNamedArg":false}],"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 slice starts with a prefix.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"prefix","type":"String","defaultValue":null,"description":"Prefix to test.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the check.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the check.","suggestAsNamedArg":false}],"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 slice ends with a suffix.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"suffix","type":"String","defaultValue":null,"description":"Suffix to test.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the check.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the check.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Substring to find.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the search.","suggestAsNamedArg":false}],"returnType":"Int","returnDescription":"First matching index, or -1.","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":"Find the first substring index and fail visibly when absent.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Substring that must exist.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the search.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the search.","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"old","type":"String","defaultValue":null,"description":"Text to replace.","suggestAsNamedArg":false},{"name":"new","type":"String","defaultValue":null,"description":"Replacement text.","suggestAsNamedArg":false},{"name":"count","type":"Int","defaultValue":"-1","description":"Maximum replacements; negative means all.","suggestAsNamedArg":false}],"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":"Split a string into a list of text parts.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sep","type":"String?","defaultValue":"None","description":"Separator text. None splits on whitespace.","suggestAsNamedArg":false},{"name":"maxsplit","type":"Int","defaultValue":"-1","description":"Maximum split count; negative means all.","suggestAsNamedArg":false}],"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 an iterable of strings using this string as the separator.","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}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"sub","type":"String","defaultValue":null,"description":"Substring to count.","suggestAsNamedArg":false},{"name":"start","type":"Int","defaultValue":"0","description":"Start index for the count.","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":"len(string)","description":"Stop index for the count.","suggestAsNamedArg":false}],"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.","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 digits.","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 all characters are letters or digits.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"true for letters or digits only.","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.","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.","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},{"name":"string","type":"String","defaultValue":null,"description":"String to iterate.","suggestAsNamedArg":true}],"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.","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}],"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":"Build and show a runtime input panel for script-controlled macro parameters.","isCallable":true,"fields":["title","subtitle","version","confirm_text","cancel_text"],"fieldDocs":[{"name":"title","type":"String","defaultValue":"\"\"","description":"Panel title. Writable after construction.","suggestAsNamedArg":true},{"name":"subtitle","type":"String","defaultValue":"\"\"","description":"Panel subtitle/helper text. Writable after construction.","suggestAsNamedArg":true},{"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},{"name":"confirm_text","type":"String","defaultValue":"\"Run\"","description":"Confirm button label.","suggestAsNamedArg":true},{"name":"cancel_text","type":"String","defaultValue":"\"Cancel\"","description":"Cancel button label.","suggestAsNamedArg":true}],"constants":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name to return in panel result.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"String","defaultValue":"\"\"","description":"Default text value.","suggestAsNamedArg":true},{"name":"desc","type":"String?","defaultValue":"None","description":"Small helper text displayed below this field.","suggestAsNamedArg":true},{"name":"input_type","type":"String","defaultValue":"\"text\"","description":"Use \"text\" for normal text or \"number\" for numeric input. The result value remains a String.","suggestAsNamedArg":true},{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default checked state.","suggestAsNamedArg":true},{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default toggle state.","suggestAsNamedArg":true},{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"options","type":"list[String]","defaultValue":null,"description":"Selectable options.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"String|Int|None","defaultValue":"None","description":"Default option label or 0-based option index; None selects the first option.","suggestAsNamedArg":true},{"name":"dropdown","type":"Boolean","defaultValue":"False","description":"Render this selector as a dropdown instead of radio options.","suggestAsNamedArg":true},{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum value.","suggestAsNamedArg":true},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum value.","suggestAsNamedArg":true},{"name":"step","type":"Number","defaultValue":"1","description":"Step size between values.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true},{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum integer value.","suggestAsNamedArg":true},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum integer value.","suggestAsNamedArg":true},{"name":"step","type":"Number","defaultValue":"1","description":"Step size.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true},{"name":"html","type":"String","defaultValue":null,"description":"HTML content to display.","suggestAsNamedArg":true}],"constructorParams":[{"name":"title","type":"String","defaultValue":"\"\"","description":"Panel title.","suggestAsNamedArg":true},{"name":"subtitle","type":"String","defaultValue":"\"\"","description":"Panel subtitle/helper text.","suggestAsNamedArg":true},{"name":"confirm_text","type":"String","defaultValue":"\"Run\"","description":"Confirm button label.","suggestAsNamedArg":true},{"name":"cancel_text","type":"String","defaultValue":"\"Cancel\"","description":"Cancel button label.","suggestAsNamedArg":true},{"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}],"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 blocking info dialog in overlay runtime and continue after user confirms. Strings stay unchanged; structured values use the same readable formatter as str(value), including multi-line expansion for nested content.","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}],"returnType":"None","returnDescription":"No return value after user confirmation.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-macropanel-static-method-error","kind":"STATIC_METHOD","parentKey":"class-macropanel","name":"error","signature":"MacroPanel.error(text)","description":"Stop script execution by throwing a runtime error. During macro runs, the overlay shows one standard script error with the flow/action path; structured values use the same readable formatter as str(value).","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}],"returnType":"None","returnDescription":"Does not return; raises a runtime error.","example":null,"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 text field. Use desc for small helper text under the field, and input_type=\"number\" to show numeric input while the returned value stays a String.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name to return in panel result.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"String","defaultValue":"\"\"","description":"Default text value.","suggestAsNamedArg":true},{"name":"desc","type":"String?","defaultValue":"None","description":"Small helper text displayed below this field.","suggestAsNamedArg":true},{"name":"input_type","type":"String","defaultValue":"\"text\"","description":"Use \"text\" for normal text or \"number\" for numeric input. The result value remains a String.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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 checkbox input.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default checked state.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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 toggle switch input.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"checked","type":"Boolean","defaultValue":"False","description":"Default toggle state.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"options","type":"list[String]","defaultValue":null,"description":"Selectable options.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"String|Int|None","defaultValue":"None","description":"Default option label or 0-based option index; None selects the first option.","suggestAsNamedArg":true},{"name":"dropdown","type":"Boolean","defaultValue":"False","description":"Render this selector as a dropdown instead of radio options.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum value.","suggestAsNamedArg":true},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum value.","suggestAsNamedArg":true},{"name":"step","type":"Number","defaultValue":"1","description":"Step size between values.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"name","type":"String","defaultValue":null,"description":"Variable name.","suggestAsNamedArg":true},{"name":"min","type":"Number","defaultValue":"0","description":"Minimum integer value.","suggestAsNamedArg":true},{"name":"max","type":"Number","defaultValue":"100","description":"Maximum integer value.","suggestAsNamedArg":true},{"name":"step","type":"Number","defaultValue":"1","description":"Step size.","suggestAsNamedArg":true},{"name":"label","type":"String?","defaultValue":"None","description":"Display label. Leave empty to hide label.","suggestAsNamedArg":true},{"name":"default","type":"Number?","defaultValue":"min","description":"Default value, clamped to min/max.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"html","type":"String","defaultValue":null,"description":"HTML content to display.","suggestAsNamedArg":true}],"returnType":"MacroPanel","returnDescription":"The same panel for fluent chaining.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-macropanel-method-show","kind":"METHOD","parentKey":"class-macropanel","name":"show","signature":"panel.show()","description":"Display panel and return typed user input values. Existing Storage values with matching variable names become the field defaults, and confirmed values are saved back to Storage by variable name: checkbox/toggle values are Boolean, slider values are Number, stepper values are Int, radio/dropdown values are 0-based Int option indexes, and edit text values are String. If the same panel.show() call reopens repeatedly without another runtime action, the runtime stops the script to avoid an infinite panel loop.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"dict of variableName -> typed value.","example":null,"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.","isCallable":true,"fields":["dev","battery","screen","memory"],"fieldDocs":[{"name":"dev","type":"dict","defaultValue":null,"description":"Device capability info (`isEmulator`, `sdk`, `language`, `darkmode`, `touch`, `capture`).","suggestAsNamedArg":true},{"name":"battery","type":"dict","defaultValue":null,"description":"Battery info (`percent`, `charging`, `temperature`, `health`).","suggestAsNamedArg":true},{"name":"screen","type":"dict","defaultValue":null,"description":"Screen info (`width`, `height`, `orientation`, `density`, `dpi`); `orientation` is display rotation in degrees: `0`, `90`, `180`, or `270`.","suggestAsNamedArg":true},{"name":"memory","type":"dict","defaultValue":null,"description":"Memory info (`avail`, `total`, `threshold`, `low`).","suggestAsNamedArg":true}],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":null,"returnDescription":null,"example":"sys = System()\nprint(\"sdk=\", sys.sdk())\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":"Get current timestamp in milliseconds.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Epoch milliseconds.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-app-version","kind":"STATIC_METHOD","parentKey":"class-system","name":"app_version","signature":"System.app_version()","description":"Get app version name.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"App version name.","example":null,"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.","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.","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}],"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":"Get Android SDK int.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Android SDK version integer.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"String","returnDescription":"Locale language code (for example `en`, `vi`).","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Number","returnDescription":"Display density DPI.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` when dark mode is active.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-toast","kind":"STATIC_METHOD","parentKey":"class-system","name":"toast","signature":"System.toast(text)","description":"Show system toast message. Structured values are rendered with the compact DSL display formatter so the toast stays short and readable.","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}],"returnType":"None","returnDescription":"No return value.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"Stops execution; no return value is observed.","example":null,"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.","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},{"name":"width","type":"Number?","defaultValue":"None","description":"Optional minimized dock footprint width in pixels.","suggestAsNamedArg":true},{"name":"height","type":"Number?","defaultValue":"None","description":"Optional minimized dock footprint height in pixels.","suggestAsNamedArg":true},{"name":"alpha","type":"Number?","defaultValue":"None","description":"Optional dock opacity from 0.2 to 1.0.","suggestAsNamedArg":true},{"name":"mode","type":"String?","defaultValue":"None","description":"Optional dock presentation. Values: icon or row.","suggestAsNamedArg":true}],"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-back","kind":"STATIC_METHOD","parentKey":"class-system","name":"back","signature":"System.back()","description":"Perform global Back action.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-home","kind":"STATIC_METHOD","parentKey":"class-system","name":"home","signature":"System.home()","description":"Perform global Home action.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-recent","kind":"STATIC_METHOD","parentKey":"class-system","name":"recent","signature":"System.recent()","description":"Open recents screen.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-noti","kind":"STATIC_METHOD","parentKey":"class-system","name":"noti","signature":"System.noti()","description":"Open notifications shade.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-powerdialog","kind":"STATIC_METHOD","parentKey":"class-system","name":"powerdialog","signature":"System.powerdialog()","description":"Open power dialog.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-quicksetting","kind":"STATIC_METHOD","parentKey":"class-system","name":"quicksetting","signature":"System.quicksetting()","description":"Open quick settings panel.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-system-static-method-screenshot","kind":"STATIC_METHOD","parentKey":"class-system","name":"screenshot","signature":"System.screenshot()","description":"Trigger global screenshot action.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"Boolean","returnDescription":"`True` if action dispatched.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-screencapture","kind":"CLASS","parentKey":null,"name":"ScreenCapture","signature":"ScreenCapture","description":"Static controls for the shared MediaProjection frame cache used by UI and script capture calls.","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()","aliases":[],"group":null},{"key":"class-screencapture-static-method-cache-on","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"cache_on","signature":"ScreenCapture.cache_on()","description":"Pin the next real screen-capture frame and reuse it until ScreenCapture.cache_off() is called. If no new buffer is queued yet, the latest valid frame from the current capture reader is pinned instead. This does not request screen-capture permission.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-screencapture-static-method-cache-off","kind":"STATIC_METHOD","parentKey":"class-screencapture","name":"cache_off","signature":"ScreenCapture.cache_off()","description":"Disable pinned screen-capture caching. A fresh pinned frame may remain available through the normal direct-pixel TTL, but stale pinned frames are cleared.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"None","returnDescription":"No return value.","example":null,"aliases":[],"group":"FLOW"},{"key":"class-storage","kind":"CLASS","parentKey":null,"name":"Storage","signature":"Storage","description":"Static persistent key/value storage for the current macro. Normal variables already stay shared between PYTHON_CODE actions during one macro run, including actions inside GROUP wrappers; use Storage only when values must survive the next macro run. Writes are autosaved after 2 seconds of idle time and committed again when the Python action stops.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to look up.","suggestAsNamedArg":true},{"name":"default","type":"Any?","defaultValue":"None","description":"Fallback value returned when the key is missing.","suggestAsNamedArg":true}],"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":"Write or replace one entry in persistent storage. Supported values keep script-friendly types such as Number, String, Boolean, Point, Region, list, tuple, dict, set, and None, including nested collection values.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to write.","suggestAsNamedArg":true},{"name":"value","type":"Any?","defaultValue":null,"description":"Value to persist for that key.","suggestAsNamedArg":true}],"returnType":"None","returnDescription":"No direct return value. The storage is updated in place, autosaved after 2 seconds of idle time, and committed again when the Python action stops.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to remove.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"key","type":"Any","defaultValue":null,"description":"Key to test.","suggestAsNamedArg":true}],"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.","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.","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.","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":"Return the current storage as a live dict for this run. Direct edits to entries in the returned dictionary join the autosave flow, and the latest live snapshot is committed when the Python action stops.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[],"returnType":"dict","returnDescription":"A live dict view of the current persisted storage entries.","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":"Click on a Point, (x, y) tuple, Match, or MatchList. Every parameter supports positional or named form in the documented order. Use Point(x, y) for coordinate metadata such as scale/anchor; use (x, y) for fixed pixel coordinates. Use parallel=True to queue this touch and receive its numeric id; call Touch.cancel(id) or Touch.cancel() to cancel queued/active touches.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"target","type":"Point | tuple[Number, Number] | Match | MatchList","defaultValue":null,"description":"Target Point, coordinate tuple, found Match, or MatchList. Match/MatchList values with multiple points click each found point.","suggestAsNamedArg":true},{"name":"hold_ms","type":"Int","defaultValue":"0","description":"Hold duration in milliseconds","suggestAsNamedArg":true},{"name":"offset","type":"tuple[Number, Number]","defaultValue":"(0, 0)","description":"Add a pixel offset after resolving the target point.","suggestAsNamedArg":true},{"name":"random","type":"Number | tuple[Number, Number]","defaultValue":"0","description":"Add random pixel offset after resolving the target point.","suggestAsNamedArg":true},{"name":"delay_before","type":"Number","defaultValue":"0","description":"Delay before the click in milliseconds.","suggestAsNamedArg":true},{"name":"delay_after","type":"Number","defaultValue":"0","description":"Delay after the click in milliseconds.","suggestAsNamedArg":true},{"name":"parallel","type":"Boolean","defaultValue":"False","description":"When True, returns a numeric touch id. In collect mode the touch waits for Touch.send(); collected overlapping touches may start at different delay_before offsets without cancelling each other.","suggestAsNamedArg":true}],"returnType":"Number | list[Number] | None","returnDescription":"Returns one numeric id for one queued parallel click, a list[Number] when a multi-point Match or MatchList queues multiple parallel clicks, otherwise 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":"Perform a swipe gesture from a flat list of SwipePoint values. Each list creates one multi-point path for one finger.","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},{"name":"parallel","type":"Boolean","defaultValue":"False","description":"When True, returns a numeric touch id. In collect mode the swipe waits for Touch.send(); otherwise it queues immediately. Use Touch.cancel(id) or Touch.cancel() to cancel queued/active touches.","suggestAsNamedArg":true}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"ms","type":"Int","defaultValue":null,"description":"Pause duration in milliseconds","suggestAsNamedArg":false}],"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":"Input text. focus_index=0 keeps current focus, 1 focuses first EditText, 2 focuses second EditText, etc.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"String","defaultValue":null,"description":"Text to input","suggestAsNamedArg":false},{"name":"focus_index","type":"Int","defaultValue":"0","description":"0: keep current focus, N>=1: focus N-th EditText before input","suggestAsNamedArg":true}],"returnType":"None","returnDescription":"No return value","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"start","type":"Int","defaultValue":"0","description":"Start value (inclusive)","suggestAsNamedArg":false},{"name":"stop","type":"Int","defaultValue":null,"description":"End value (exclusive)","suggestAsNamedArg":false},{"name":"step","type":"Int","defaultValue":"1","description":"Step increment","suggestAsNamedArg":false}],"returnType":"list[Int]","returnDescription":"list of integers from start to stop","example":"numbers = range(5)          # returns [0, 1, 2, 3, 4]\nevens = range(0, 10, 2)   # returns [0, 2, 4, 6, 8]\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":"Return a list of tuple(index, item) pairs for any iterable value.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict","defaultValue":null,"description":"Value to enumerate. Dictionaries enumerate keys.","suggestAsNamedArg":true},{"name":"start","type":"Int","defaultValue":"0","description":"First index value.","suggestAsNamedArg":true}],"returnType":"list[tuple]","returnDescription":"list of two-item tuples: index first, original item second.","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)","description":"Combine iterables into a list of tuples, stopping at the shortest input.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterables","type":"String | list | tuple | dict","defaultValue":null,"description":"Values to combine. Dictionaries contribute keys.","suggestAsNamedArg":false}],"returnType":"list[tuple]","returnDescription":"list of tuples where each tuple contains one item from each input.","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.","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.","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},{"name":"max","type":"Int","defaultValue":null,"description":"Upper bound of the range.","suggestAsNamedArg":false}],"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.","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}],"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, /)","description":"Cast value to integer (truncates decimal part).","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float | Boolean | String","defaultValue":null,"description":"Value to cast","suggestAsNamedArg":false}],"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, /)","description":"Cast value to floating-point number.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float | Boolean | String","defaultValue":null,"description":"Value to cast","suggestAsNamedArg":false}],"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 string using DSL display format. Point/Region stay compact, two-dimensional lists render as one row list per line, and only rows that are too long or complex expand into vertical multi-line text. Large or deeply nested structured values use a bounded preview with explicit omitted/budget markers; a direct string value remains unchanged.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":null,"description":"Value to convert","suggestAsNamedArg":false}],"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'>.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":null,"description":"Value to inspect","suggestAsNamedArg":false}],"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 without blocking execution. Structured values use the same bounded display formatter as str(value), including row-based pretty output for two-dimensional lists, multi-line output for complex nesting, and explicit markers when content is omitted.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"values","type":"Any","defaultValue":null,"description":"Values to print","suggestAsNamedArg":false},{"name":"sep","type":"String","defaultValue":"\" \"","description":"Separator between values","suggestAsNamedArg":true},{"name":"end","type":"String","defaultValue":"\"\\n\"","description":"Suffix appended after each print call","suggestAsNamedArg":true}],"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, /)","description":"Convert value to boolean using script truthy/falsy rules.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Any","defaultValue":null,"description":"Value to convert","suggestAsNamedArg":false}],"returnType":"Boolean","returnDescription":"false for None/0/empty; 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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false}],"returnType":"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":"Return the numeric sum of an iterable, optionally starting from start.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"list | tuple | set | generator","defaultValue":null,"description":"Iterable containing numeric values.","suggestAsNamedArg":false},{"name":"start","type":"Number","defaultValue":"0","description":"Initial value added before iterable items.","suggestAsNamedArg":true}],"returnType":"Number","returnDescription":"Total numeric value.","example":"values = [1, 2, 3]\ntotal = sum(values)\ntext(str(total))","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict","defaultValue":null,"description":"Single iterable input. Dictionaries compare keys.","suggestAsNamedArg":false},{"name":"args","type":"Any","defaultValue":null,"description":"Additional positional values when passing two or more arguments.","suggestAsNamedArg":false},{"name":"default","type":"Any","defaultValue":"-","description":"Value returned when the single iterable is empty. Only valid with one iterable argument.","suggestAsNamedArg":true},{"name":"key","type":"Callable?","defaultValue":"None","description":"One-argument callable used to compute comparison keys.","suggestAsNamedArg":true}],"returnType":"Any","returnDescription":"The original smallest item, or default when an empty iterable is provided with default=.","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict","defaultValue":null,"description":"Single iterable input. Dictionaries compare keys.","suggestAsNamedArg":false},{"name":"args","type":"Any","defaultValue":null,"description":"Additional positional values when passing two or more arguments.","suggestAsNamedArg":false},{"name":"default","type":"Any","defaultValue":"-","description":"Value returned when the single iterable is empty. Only valid with one iterable argument.","suggestAsNamedArg":true},{"name":"key","type":"Callable?","defaultValue":"None","description":"One-argument callable used to compute comparison keys.","suggestAsNamedArg":true}],"returnType":"Any","returnDescription":"The original largest item, or default when an empty iterable is provided with default=.","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 containing all items from iterable in sorted order. key can compute comparison keys; reverse=True sorts descending while keeping equal-key items stable.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"iterable","type":"String | list | tuple | dict | set","defaultValue":null,"description":"Iterable input. Dictionaries sort keys.","suggestAsNamedArg":false},{"name":"key","type":"Callable?","defaultValue":"None","description":"One-argument callable used to compute comparison keys.","suggestAsNamedArg":true},{"name":"reverse","type":"Boolean","defaultValue":"False","description":"Sort descending when True.","suggestAsNamedArg":true}],"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(value, digits=0, /)","description":"Round value to a given number of decimal digits.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false},{"name":"digits","type":"Int","defaultValue":"0","description":"Decimal digits to keep","suggestAsNamedArg":false}],"returnType":"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number (>= 0)","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"base","type":"Int | Float","defaultValue":null,"description":"Base value","suggestAsNamedArg":false},{"name":"exponent","type":"Int | Float","defaultValue":null,"description":"Exponent value","suggestAsNamedArg":false}],"returnType":"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false}],"returnType":"Float","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input number","suggestAsNamedArg":false}],"returnType":"Float","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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Angle in radians","suggestAsNamedArg":false}],"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.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input value (> 0)","suggestAsNamedArg":false},{"name":"base","type":"Int | Float","defaultValue":null,"description":"Optional base (> 0 and != 1)","suggestAsNamedArg":false}],"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":"Clamp value into the min -> max range.","isCallable":null,"fields":[],"fieldDocs":[],"constants":[],"constructorParams":[],"fieldExample":null,"constructorExample":null,"params":[{"name":"value","type":"Int | Float","defaultValue":null,"description":"Input value","suggestAsNamedArg":false},{"name":"min","type":"Int | Float","defaultValue":null,"description":"Lower bound","suggestAsNamedArg":false},{"name":"max","type":"Int | Float","defaultValue":null,"description":"Upper bound","suggestAsNamedArg":false}],"returnType":"Float","returnDescription":"Clamped numeric value.","example":"safe = clamp(135, 0, 100)\ntext(str(safe))","aliases":[],"group":"MATH"}]}}