Skip to content

Commit 377fa10

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating until transpiler (supporting #153)
1 parent e31c40d commit 377fa10

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

docs/Until.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,44 @@ until will always run at least once, and will run until a condition is true.
2626

2727
#### EXAMPLE 2
2828
```PowerShell
29-
{
29+
Invoke-PipeScript {
3030
until "00:00:05" {
3131
[DateTime]::Now
3232
Start-Sleep -Milliseconds 500
3333
}
34-
} | .>PipeScript
34+
}
3535
```
3636

3737
#### EXAMPLE 3
3838
```PowerShell
39+
Invoke-PipeScript {
40+
until "12:17 pm" {
41+
[DateTime]::Now
42+
Start-Sleep -Milliseconds 500
43+
}
44+
}
45+
```
46+
47+
#### EXAMPLE 4
48+
```PowerShell
49+
{
50+
$eventCounter = 0
51+
until "MyEvent" {
52+
$eventCounter++
53+
$eventCounter
54+
until "00:00:03" {
55+
"sleeping a few seconds"
56+
Start-Sleep -Milliseconds 500
57+
}
58+
if (-not ($eventCounter % 5)) {
59+
$null = New-Event -SourceIdentifier MyEvent
60+
}
61+
}
62+
} | .>PipeScript
63+
```
64+
65+
#### EXAMPLE 5
66+
```PowerShell
3967
Invoke-PipeScript {
4068
$tries = 3
4169
until (-not $tries) {

0 commit comments

Comments
 (0)