Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak » !SLIPdial/Resources/UK/Help/wait
!SLIPdial/Resources/UK/Help/wait
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak |
Filename: | !SLIPdial/Resources/UK/Help/wait |
Read OK: | ✔ |
File size: | 03F9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
wait [/delay=<n>] [/id=<id>] <string1> [<string2>...] waits for a string to be received. You can specify up to 4 strings to wait for. For example: wait login password returns 1 if "login" is detected, 2 if "password" is detected, or 0 if the command times out. The default timeout is 600 seconds (10 minutes); you can alter this with the /delay=<n> qualifier. For example: wait /delay=20 login waits for 20 seconds for the string "login". To include spaces in a wait string, quote the string - eg: wait /delay=20 login "contrived example" HELLO The default input stream examined is the serial (or other) port, as defined by the "port" command. If the qualifier "/id=<id>" is specified, the output stream from the specified taskwindow is examined instead. Note that you can at present only specify a taskwindow which is being buffered to a window; not one with output to a file. wait /event waits for an event such as an alarm or a user menu selection.
00000000 77 61 69 74 20 5b 2f 64 65 6c 61 79 3d 3c 6e 3e |wait [/delay=<n>| 00000010 5d 20 5b 2f 69 64 3d 3c 69 64 3e 5d 20 3c 73 74 |] [/id=<id>] <st| 00000020 72 69 6e 67 31 3e 20 5b 3c 73 74 72 69 6e 67 32 |ring1> [<string2| 00000030 3e 2e 2e 2e 5d 0a 20 77 61 69 74 73 20 66 6f 72 |>...]. waits for| 00000040 20 61 20 73 74 72 69 6e 67 20 74 6f 20 62 65 20 | a string to be | 00000050 72 65 63 65 69 76 65 64 2e 20 59 6f 75 20 63 61 |received. You ca| 00000060 6e 20 73 70 65 63 69 66 79 20 75 70 0a 20 74 6f |n specify up. to| 00000070 20 34 20 73 74 72 69 6e 67 73 20 74 6f 20 77 61 | 4 strings to wa| 00000080 69 74 20 66 6f 72 2e 20 46 6f 72 20 65 78 61 6d |it for. For exam| 00000090 70 6c 65 3a 0a 20 77 61 69 74 20 6c 6f 67 69 6e |ple:. wait login| 000000a0 20 70 61 73 73 77 6f 72 64 0a 20 20 72 65 74 75 | password. retu| 000000b0 72 6e 73 20 31 20 69 66 20 22 6c 6f 67 69 6e 22 |rns 1 if "login"| 000000c0 20 69 73 20 64 65 74 65 63 74 65 64 2c 20 32 20 | is detected, 2 | 000000d0 69 66 20 22 70 61 73 73 77 6f 72 64 22 20 69 73 |if "password" is| 000000e0 20 64 65 74 65 63 74 65 64 2c 20 6f 72 20 30 20 | detected, or 0 | 000000f0 69 66 20 74 68 65 0a 20 20 63 6f 6d 6d 61 6e 64 |if the. command| 00000100 20 74 69 6d 65 73 20 6f 75 74 2e 0a 20 20 54 68 | times out.. Th| 00000110 65 20 64 65 66 61 75 6c 74 20 74 69 6d 65 6f 75 |e default timeou| 00000120 74 20 69 73 20 36 30 30 20 73 65 63 6f 6e 64 73 |t is 600 seconds| 00000130 20 28 31 30 20 6d 69 6e 75 74 65 73 29 3b 20 79 | (10 minutes); y| 00000140 6f 75 20 63 61 6e 20 61 6c 74 65 72 20 74 68 69 |ou can alter thi| 00000150 73 20 77 69 74 68 0a 20 20 74 68 65 20 2f 64 65 |s with. the /de| 00000160 6c 61 79 3d 3c 6e 3e 20 71 75 61 6c 69 66 69 65 |lay=<n> qualifie| 00000170 72 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 3a 0a |r. For example:.| 00000180 20 20 77 61 69 74 20 2f 64 65 6c 61 79 3d 32 30 | wait /delay=20| 00000190 20 6c 6f 67 69 6e 0a 20 20 20 77 61 69 74 73 20 | login. waits | 000001a0 66 6f 72 20 32 30 20 73 65 63 6f 6e 64 73 20 66 |for 20 seconds f| 000001b0 6f 72 20 74 68 65 20 73 74 72 69 6e 67 20 22 6c |or the string "l| 000001c0 6f 67 69 6e 22 2e 0a 20 54 6f 20 69 6e 63 6c 75 |ogin".. To inclu| 000001d0 64 65 20 73 70 61 63 65 73 20 69 6e 20 61 20 77 |de spaces in a w| 000001e0 61 69 74 20 73 74 72 69 6e 67 2c 20 71 75 6f 74 |ait string, quot| 000001f0 65 20 74 68 65 20 73 74 72 69 6e 67 20 2d 20 65 |e the string - e| 00000200 67 3a 0a 20 20 77 61 69 74 20 2f 64 65 6c 61 79 |g:. wait /delay| 00000210 3d 32 30 20 6c 6f 67 69 6e 20 22 63 6f 6e 74 72 |=20 login "contr| 00000220 69 76 65 64 20 65 78 61 6d 70 6c 65 22 20 48 45 |ived example" HE| 00000230 4c 4c 4f 0a 0a 20 54 68 65 20 64 65 66 61 75 6c |LLO.. The defaul| 00000240 74 20 69 6e 70 75 74 20 73 74 72 65 61 6d 20 65 |t input stream e| 00000250 78 61 6d 69 6e 65 64 20 69 73 20 74 68 65 20 73 |xamined is the s| 00000260 65 72 69 61 6c 20 28 6f 72 20 6f 74 68 65 72 29 |erial (or other)| 00000270 20 70 6f 72 74 2c 20 61 73 20 64 65 66 69 6e 65 | port, as define| 00000280 64 0a 20 20 62 79 20 74 68 65 20 22 70 6f 72 74 |d. by the "port| 00000290 22 20 63 6f 6d 6d 61 6e 64 2e 20 49 66 20 74 68 |" command. If th| 000002a0 65 20 71 75 61 6c 69 66 69 65 72 20 22 2f 69 64 |e qualifier "/id| 000002b0 3d 3c 69 64 3e 22 20 69 73 20 73 70 65 63 69 66 |=<id>" is specif| 000002c0 69 65 64 2c 20 74 68 65 0a 20 20 6f 75 74 70 75 |ied, the. outpu| 000002d0 74 20 73 74 72 65 61 6d 20 66 72 6f 6d 20 74 68 |t stream from th| 000002e0 65 20 73 70 65 63 69 66 69 65 64 20 74 61 73 6b |e specified task| 000002f0 77 69 6e 64 6f 77 20 69 73 20 65 78 61 6d 69 6e |window is examin| 00000300 65 64 20 69 6e 73 74 65 61 64 2e 20 4e 6f 74 65 |ed instead. Note| 00000310 20 74 68 61 74 0a 20 20 79 6f 75 20 63 61 6e 20 | that. you can | 00000320 61 74 20 70 72 65 73 65 6e 74 20 6f 6e 6c 79 20 |at present only | 00000330 73 70 65 63 69 66 79 20 61 20 74 61 73 6b 77 69 |specify a taskwi| 00000340 6e 64 6f 77 20 77 68 69 63 68 20 69 73 20 62 65 |ndow which is be| 00000350 69 6e 67 20 62 75 66 66 65 72 65 64 20 74 6f 20 |ing buffered to | 00000360 61 0a 20 20 77 69 6e 64 6f 77 3b 20 6e 6f 74 20 |a. window; not | 00000370 6f 6e 65 20 77 69 74 68 20 6f 75 74 70 75 74 20 |one with output | 00000380 74 6f 20 61 20 66 69 6c 65 2e 0a 20 20 20 20 20 |to a file.. | 00000390 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000003a0 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 77 61 | .wa| 000003b0 69 74 20 2f 65 76 65 6e 74 0a 20 77 61 69 74 73 |it /event. waits| 000003c0 20 66 6f 72 20 61 6e 20 65 76 65 6e 74 20 73 75 | for an event su| 000003d0 63 68 20 61 73 20 61 6e 20 61 6c 61 72 6d 20 6f |ch as an alarm o| 000003e0 72 20 61 20 75 73 65 72 20 6d 65 6e 75 20 73 65 |r a user menu se| 000003f0 6c 65 63 74 69 6f 6e 2e 0a |lection..| 000003f9