SplitScript reference / Language / selectProcess
selectProcess
lifecycle block
selectProcess { ... }
Chooses among same-name process candidates.
Runs synchronously for each candidate before provider setup and onAttach. The candidate is exposed as process. Return true to accept it or false to try another candidate. This block is an implicit error boundary: postfix ? and throw reject only the current candidate. Falling through also rejects the candidate. State snapshots, provider roots, and attachment-scoped globals are not initialized yet.
Examples
Use selectProcess
selectProcess {
let path = process.path()?
return path.endsWith("/wanted/game.exe")
}
Related
| Symbol | Description |
|---|---|
| T! | Names a fallible result type. |
| ? | Propagates a T! error. |
| throw | Transfers an error to the nearest failure boundary. |
| onAttach | Initializes one state-provider attachment. |