/ BBS in a Box 10
/ BBS In A Box Volume X (AMUG) (January 1994).bin / Files / System7 tools / AppleScript / Script Tools.cpt / Script Tools / Examples / File IO Example II ![]() | < prev | next > |
MacBinary | 1993-07-08 | 1.3 KB | [TEXT/ToyS] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, inited, Thu Jul 8 17:43:53 1993, modified Thu Jul 8 17:43:53 1993, creator 'ToyS', type ASCII, 383 bytes "File IO Example II" , at 0x1ff 656 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [ToyS] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 46 69 6c 65 20 49 | 4f 20 45 78 61 6d 70 6c |..File I|O Exampl|
|00000010| 65 20 49 49 00 00 00 00 | 00 00 00 00 00 00 00 00 |e II....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 01 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 01 7f 00 | 00 02 90 a8 62 45 99 a8 |........|....bE..|
|00000060| 62 45 99 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |bE......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d3 d9 00 00 |........|........|
|00000080| 2d 2d 0d 2d 2d 09 4c 65 | 74 20 74 68 65 20 75 73 |--.--.Le|t the us|
|00000090| 65 72 20 70 69 63 6b 20 | 61 20 66 69 6c 65 20 74 |er pick |a file t|
|000000a0| 6f 20 72 65 61 64 0d 2d | 2d 0d 73 65 74 20 6e 65 |o read.-|-.set ne|
|000000b0| 77 46 69 6c 65 20 74 6f | 20 63 68 6f 6f 73 65 20 |wFile to| choose |
|000000c0| 66 69 6c 65 20 77 69 74 | 68 20 70 72 6f 6d 70 74 |file wit|h prompt|
|000000d0| 20 22 50 69 63 6b 20 61 | 20 66 69 6c 65 20 74 6f | "Pick a| file to|
|000000e0| 20 72 65 61 64 3a 22 20 | 6f 66 20 74 79 70 65 20 | read:" |of type |
|000000f0| 7b 22 54 45 58 54 22 7d | 0d 0d 0d 2d 2d 0d 2d 2d |{"TEXT"}|...--.--|
|00000100| 09 4f 70 65 6e 20 74 68 | 65 20 66 69 6c 65 20 61 |.Open th|e file a|
|00000110| 6e 64 20 72 65 61 64 20 | 74 68 72 6f 75 67 68 20 |nd read |through |
|00000120| 69 74 0d 2d 2d 0d 73 65 | 74 20 72 65 66 4e 75 6d |it.--.se|t refNum|
|00000130| 20 74 6f 20 6f 70 65 6e | 20 66 69 6c 65 20 6e 65 | to open| file ne|
|00000140| 77 46 69 6c 65 20 66 6f | 72 20 72 65 61 64 69 6e |wFile fo|r readin|
|00000150| 67 0d 74 72 79 0d 09 72 | 65 70 65 61 74 0d 09 09 |g.try..r|epeat...|
|00000160| 73 65 74 20 69 6e 70 75 | 74 20 74 6f 20 72 65 61 |set inpu|t to rea|
|00000170| 64 20 66 69 6c 65 20 72 | 65 66 4e 75 6d 0d 09 09 |d file r|efNum...|
|00000180| 64 69 73 70 6c 61 79 20 | 64 69 61 6c 6f 67 20 69 |display |dialog i|
|00000190| 6e 70 75 74 20 62 75 74 | 74 6f 6e 73 20 7b 22 4f |nput but|tons {"O|
|000001a0| 4b 22 7d 20 64 65 66 61 | 75 6c 74 20 62 75 74 74 |K"} defa|ult butt|
|000001b0| 6f 6e 20 22 4f 4b 22 0d | 09 65 6e 64 20 72 65 70 |on "OK".|.end rep|
|000001c0| 65 61 74 0d 6f 6e 20 65 | 72 72 6f 72 0d 09 2d 2d |eat.on e|rror..--|
|000001d0| 0d 09 2d 2d 09 41 73 73 | 75 6d 65 20 45 4f 46 0d |..--.Ass|ume EOF.|
|000001e0| 09 2d 2d 0d 09 63 6c 6f | 73 65 20 66 69 6c 65 20 |.--..clo|se file |
|000001f0| 72 65 66 4e 75 6d 0d 65 | 6e 64 20 74 72 79 0d 00 |refNum.e|nd try..|
|00000200| 00 00 01 00 00 00 02 36 | 00 00 01 36 00 00 00 5a |.......6|...6...Z|
|00000210| ff ad 01 ff ad 00 04 00 | 00 01 d1 0e 00 6f 00 07 |........|.....o..|
|00000220| 10 ff ac 00 70 ff ab ff | aa 00 71 00 72 ff a9 01 |....p...|..q.r...|
|00000230| 12 46 69 6c 65 20 49 4f | 20 45 78 61 6d 70 6c 65 |.File IO| Example|
|00000240| 20 49 49 20 02 00 00 00 | 50 61 72 74 53 49 54 21 | II ....|PartSIT!|
|00000250| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000270| 00 00 a8 b3 c5 ae 00 00 | 00 00 00 00 02 90 79 00 |........|......y.|
|00000280| 02 00 59 00 7a 02 00 7a | 00 02 00 5f 00 7b 02 00 |..Y.z..z|..._.{..|
|00000290| 7b 00 02 00 65 ff a8 02 | ff a8 00 00 01 ff ab 00 |{...e...|........|
|000002a0| 00 02 ff aa 00 00 10 00 | 71 00 00 10 00 72 00 18 |........|q....r..|
|000002b0| ff a7 00 11 ff a6 ff a5 | ff a4 ff a3 ff a2 ff a1 |........|........|
|000002c0| ff a0 ff 9f ff 9e ff 9d | ff 9c 00 4c ff 9b ff 9a |........|...L....|
|000002d0| ff 99 ff 98 ff 97 00 58 | ff 96 00 5e 00 64 ff 95 |.......X|...^.d..|
|000002e0| 0a ff a7 00 04 2f 70 72 | 6d 70 0a ff a6 00 18 2e |...../pr|mp......|
|000002f0| 73 79 73 6f 73 74 44 66 | 73 74 64 72 00 00 00 00 |sysostDf|stdr....|
|00000300| 00 00 00 da 46 69 6c 65 | 20 49 4f 20 41 64 64 69 |....File| IO Addi|
|00000310| 74 69 6f 6e 20 45 78 61 | 6d 70 6c 65 20 49 49 0d |tion Exa|mple II.|
|00000320| 43 6f 70 79 72 69 67 68 | 74 20 a9 20 31 39 39 33 |Copyrigh|t . 1993|
|00000330| 20 4d 61 72 6b 20 41 6c | 6c 64 72 69 74 74 0d 41 | Mark Al|ldritt.A|
|00000340| 6c 6c 20 52 69 67 68 74 | 73 20 52 65 73 65 72 76 |ll Right|s Reserv|
|00000350| 65 64 0d 0d 54 68 69 73 | 20 73 63 72 69 70 74 20 |ed..This| script |
|00000360| 69 6c 6c 75 73 74 72 61 | 74 65 73 20 68 6f 77 20 |illustra|tes how |
|00000370| 74 6f 20 72 65 61 64 20 | 61 20 74 65 78 74 20 66 |to read |a text f|
|00000380| 69 6c 65 20 75 73 69 6e | 67 20 74 68 65 20 46 69 |ile usin|g the Fi|
|00000390| 6c 65 20 49 4f 20 63 6f | 6d 6d 61 6e 64 73 2e 20 |le IO co|mmands. |
|000003a0| 20 41 20 64 69 61 6c 6f | 67 20 62 6f 78 20 69 73 | A dialo|g box is|
|000003b0| 20 64 69 73 70 6c 61 79 | 65 64 20 74 6f 20 73 68 | display|ed to sh|
|000003c0| 6f 77 20 65 61 63 68 20 | 6c 69 6e 65 20 61 73 20 |ow each |line as |
|000003d0| 69 74 20 69 73 20 72 65 | 61 64 20 69 6e 2e 00 00 |it is re|ad in...|
|000003e0| 00 3e 00 03 00 00 00 00 | 00 0c 00 09 00 10 00 00 |.>......|........|
|000003f0| 00 0a 00 00 00 00 00 00 | 00 00 00 4e 00 0e 00 0a |........|...N....|
|00000400| 00 10 00 00 00 0c 00 00 | 00 00 00 00 00 00 00 50 |........|.......P|
|00000410| 00 0c 00 09 00 16 00 00 | 00 0a 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 12 00 2b 00 04 | 01 6f 01 ff 00 2b 00 04 |.....+..|.o...+..|
|00000430| 01 d8 02 6a 00 01 00 00 | 01 00 00 00 02 36 00 00 |...j....|.....6..|
|00000440| 01 36 00 00 00 5a 00 5f | 70 38 0b 64 00 00 00 1c |.6...Z._|p8.d....|
|00000450| 00 5a 00 02 54 45 58 54 | 00 00 00 1a 73 74 79 6c |.Z..TEXT|....styl|
|00000460| 00 00 00 26 57 50 6f 73 | 00 00 00 32 04 68 ff ff |...&WPos|...2.h..|
|00000470| 00 00 00 00 00 5f 6f e0 | 04 68 ff ff 00 00 00 de |....._o.|.h......|
|00000480| 00 5f 6f e8 00 80 ff ff | 00 00 01 20 00 5f 6e f4 |._o.....|... ._n.|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+