Clarify Batch error policies and measured Custom settings

This commit is contained in:
yoriswind committed 2026-11-01 19:29:58 -08:00
1 parent c60fc81fc3
commit f3e5c63383
4 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -509,8 +509,8 @@ pub fn restore_recording(s: &mut Session, idx: usize, action: &str, from: usize)
s.journal.push(("actions.play".into(), params));
}
/// Nested playback returns a structured failure even though the command itself succeeded.
/// Promote it to the caller's failed step so no later parent steps run after a child fails.
/// Recorded child commands can report failure inside a successful response.
/// Promote action or Batch failures so a recorded parent does not run later steps.
pub fn nested_failure(id: &str, value: &Value) -> Option<String> {
// Batch keeps per-file results for direct callers, but a failed recorded Batch step stops its parent.
if id == "file.automate.batch" {
+1
View File
@@ -129,6 +129,7 @@ fn nested_script_failure(id: &str, r: &Value) -> Option<String> {
(id == "file.scripts.browse" && r.get("ok") == Some(&Value::Bool(false))).then(|| "a script it runs failed".to_string())
}
/// Direct Batch file errors remain script results; called action failures stop later script steps.
fn run_steps(s: &mut Session, steps: &[(String, Value)]) -> Vec<Value> {
let mut results = Vec::new();
for (id, params) in steps {
@@ -283,6 +283,7 @@ pub(crate) fn batch_action(list: &[crate::actions_cmds::Action], p: &Value) -> R
crate::actions_cmds::resolve(list, p, CMD)
}
/// Apply the selected file-error policy while retaining per-file results for direct callers.
pub(super) fn batch(s: &mut Session, p: &Value) -> Result<Value> {
let cmd = "file.automate.batch";
let stop_on_error = match p.get("stopOnError") {
+2 -2
View File
@@ -1652,8 +1652,8 @@ No parameters: the step carries an empty descriptor.
| Key | String ID | Type | Unit | Example value | Allowed |
|---|---|---|---|---|---|
| `Scl ` | scale | integer | | 1 | 1 .. 9999 (measured in the dialog). Without the dialog the value is ignored |
| `Ofst` | offset | integer | | 0 | -9999 .. 9999 (measured in the dialog). Without the dialog the value is ignored |
| `Scl ` | scale | integer | | 1 | 1 .. 9999 (measured in the dialog). Applies without the dialog too: scale 2 halves the output |
| `Ofst` | offset | integer | | 0 | -9999 .. 9999 (measured in the dialog). Applies without the dialog too: offset 50 adds 50 |
| `Mtrx` | matrix | list | | none: a step always carries all 25 cells | exactly 25 integers (5 x 5, row by row), each -999 .. 999; a 3 x 3 list makes the application fail |
#### Replace Color