home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / Frontier / Frontier SDK 2.1.sit / Frontier SDK 2.1 / Sample Code / Frontier Do-Script / main.c < prev    next >
MacBinary  |  1992-10-11  |  12.1 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: main.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Oct 11 14:30:00 1992, modified Sun Oct 11 14:30:00 1992, creator Think C, type ASCII, 11839 bytes "main.c" , at 0x2ebf 370 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 6d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..main.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 2e 3f 00 | 00 01 72 a6 fe 23 28 a6 |......?.|..r..#(.|
|00000060| fe 23 28 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.#(.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1c 9f 00 00 |........|........|
|00000080| 20 0d 2f 2a a9 20 43 6f | 70 79 72 69 67 68 74 20 | ./*. Co|pyright |
|00000090| 31 39 38 39 2d 31 39 39 | 31 20 55 73 65 72 4c 61 |1989-199|1 UserLa|
|000000a0| 6e 64 20 53 6f 66 74 77 | 61 72 65 2c 20 49 6e 63 |nd Softw|are, Inc|
|000000b0| 2e 20 20 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 |. All R|ights Re|
|000000c0| 73 65 72 76 65 64 2e 2a | 2f 0d 0d 0d 2f 2a 0d 46 |served.*|/.../*.F|
|000000d0| 72 6f 6e 74 69 65 72 20 | 44 6f 2d 53 63 72 69 70 |rontier |Do-Scrip|
|000000e0| 74 20 2d 2d 20 44 72 69 | 76 65 73 20 46 72 6f 6e |t -- Dri|ves Fron|
|000000f0| 74 69 65 72 27 73 20 22 | 64 6f 2d 73 63 72 69 70 |tier's "|do-scrip|
|00000100| 74 22 20 41 70 70 6c 65 | 20 65 76 65 6e 74 2e 20 |t" Apple| event. |
|00000110| 59 6f 75 20 63 61 6e 20 | 73 65 6e 64 20 0d 61 6e |You can |send .an|
|00000120| 79 20 76 61 6c 69 64 20 | 46 72 6f 6e 74 69 65 72 |y valid |Frontier|
|00000130| 20 73 63 72 69 70 74 20 | 61 63 72 6f 73 73 20 74 | script |across t|
|00000140| 68 69 73 20 63 68 61 6e | 6e 65 6c 2e 20 0d 0d 54 |his chan|nel. ..T|
|00000150| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 73 74 61 72 |his prog|ram star|
|00000160| 74 73 20 62 79 20 73 65 | 6e 64 69 6e 67 20 61 20 |ts by se|nding a |
|00000170| 73 63 72 69 70 74 20 77 | 69 74 68 20 61 20 73 79 |script w|ith a sy|
|00000180| 6e 74 61 78 20 65 72 72 | 6f 72 2c 20 74 6f 20 74 |ntax err|or, to t|
|00000190| 65 73 74 20 74 68 65 20 | 65 72 72 6f 72 0d 72 65 |est the |error.re|
|000001a0| 70 6f 72 74 69 6e 67 20 | 6d 65 63 68 61 6e 69 73 |porting |mechanis|
|000001b0| 6d 2e 0d 0d 54 68 65 6e | 20 69 74 20 73 65 6e 64 |m...Then| it send|
|000001c0| 73 20 61 20 64 6f 2d 73 | 63 72 69 70 74 20 6d 65 |s a do-s|cript me|
|000001d0| 73 73 61 67 65 20 74 6f | 20 46 72 6f 6e 74 69 65 |ssage to| Frontie|
|000001e0| 72 20 6f 6e 63 65 20 65 | 76 65 72 79 20 35 20 73 |r once e|very 5 s|
|000001f0| 65 63 6f 6e 64 73 2e 20 | 59 6f 75 20 63 61 6e 0d |econds. |You can.|
|00000200| 6c 65 61 76 65 20 74 68 | 69 73 20 70 72 6f 67 72 |leave th|is progr|
|00000210| 61 6d 20 72 75 6e 6e 69 | 6e 67 20 77 68 69 6c 65 |am runni|ng while|
|00000220| 20 79 6f 75 20 75 73 65 | 20 46 72 6f 6e 74 69 65 | you use| Frontie|
|00000230| 72 20 74 6f 20 74 65 73 | 74 20 64 6f 2d 73 63 72 |r to tes|t do-scr|
|00000240| 69 70 74 69 6e 67 20 69 | 6e 20 61 6c 6c 0d 63 69 |ipting i|n all.ci|
|00000250| 72 63 75 6d 73 74 61 6e | 63 65 73 2e 20 50 6c 65 |rcumstan|ces. Ple|
|00000260| 61 73 65 20 72 65 70 6f | 72 74 20 61 6e 79 20 70 |ase repo|rt any p|
|00000270| 72 6f 62 6c 65 6d 73 20 | 74 6f 20 55 73 65 72 4c |roblems |to UserL|
|00000280| 61 6e 64 20 53 6f 66 74 | 77 61 72 65 2e 0d 0d 54 |and Soft|ware...T|
|00000290| 68 69 73 20 69 73 20 61 | 20 76 65 72 79 20 62 61 |his is a| very ba|
|000002a0| 72 65 20 62 6f 6e 65 73 | 20 70 72 6f 67 72 61 6d |re bones| program|
|000002b0| 20 77 69 74 68 20 6f 6e | 65 20 77 69 6e 64 6f 77 | with on|e window|
|000002c0| 20 61 6e 64 20 6e 6f 20 | 6d 65 6e 75 20 62 61 72 | and no |menu bar|
|000002d0| 2e 20 54 6f 20 71 75 69 | 74 20 46 44 53 0d 6a 75 |. To qui|t FDS.ju|
|000002e0| 73 74 20 63 6c 6f 73 65 | 20 74 68 65 20 77 69 6e |st close| the win|
|000002f0| 64 6f 77 2e 0d 0d 49 4d | 50 4f 52 54 41 4e 54 20 |dow...IM|PORTANT |
|00000300| 4e 4f 54 45 3a 20 54 68 | 69 73 20 76 65 72 73 69 |NOTE: Th|is versi|
|00000310| 6f 6e 20 6f 66 20 46 72 | 6f 6e 74 69 65 72 20 44 |on of Fr|ontier D|
|00000320| 6f 2d 53 63 72 69 70 74 | 20 69 73 20 70 72 69 6d |o-Script| is prim|
|00000330| 61 72 69 6c 79 20 69 6e | 74 65 6e 64 65 64 20 66 |arily in|tended f|
|00000340| 6f 72 0d 64 65 76 65 6c | 6f 70 65 72 73 20 77 68 |or.devel|opers wh|
|00000350| 6f 20 61 72 65 20 62 75 | 69 6c 64 69 6e 67 20 64 |o are bu|ilding d|
|00000360| 69 72 65 63 74 6c 79 20 | 6f 6e 20 74 6f 70 20 6f |irectly |on top o|
|00000370| 66 20 74 68 65 20 41 70 | 70 6c 65 20 45 76 65 6e |f the Ap|ple Even|
|00000380| 74 20 4d 61 6e 61 67 65 | 72 2e 20 49 66 20 79 6f |t Manage|r. If yo|
|00000390| 75 27 72 65 0d 75 73 69 | 6e 67 20 74 68 65 20 49 |u're.usi|ng the I|
|000003a0| 41 43 20 54 6f 6f 6c 73 | 20 6c 69 62 72 61 72 79 |AC Tools| library|
|000003b0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 69 6e 20 | impleme|nted in |
|000003c0| 69 61 63 2e 63 2c 20 63 | 72 69 62 20 74 68 65 20 |iac.c, c|rib the |
|000003d0| 76 65 72 73 69 6f 6e 20 | 6f 66 20 46 44 53 20 66 |version |of FDS f|
|000003e0| 72 6f 6d 0d 74 68 65 20 | 41 70 70 6c 65 74 20 54 |rom.the |Applet T|
|000003f0| 6f 6f 6c 6b 69 74 20 64 | 6f 73 63 72 69 70 74 2e |oolkit d|oscript.|
|00000400| 63 20 66 69 6c 65 2e 20 | 49 74 20 63 61 6c 6c 73 |c file. |It calls|
|00000410| 20 49 41 43 20 54 6f 6f | 6c 73 20 72 6f 75 74 69 | IAC Too|ls routi|
|00000420| 6e 65 73 20 74 6f 20 74 | 61 6c 6b 20 74 6f 20 0d |nes to t|alk to .|
|00000430| 46 72 6f 6e 74 69 65 72 | 2e 0d 2a 2f 0d 0d 0d 23 |Frontier|..*/...#|
|00000440| 69 6e 63 6c 75 64 65 20 | 3c 41 70 70 6c 65 45 76 |include |<AppleEv|
|00000450| 65 6e 74 73 2e 68 3e 0d | 0d 23 64 65 66 69 6e 65 |ents.h>.|.#define|
|00000460| 20 73 65 63 6f 6e 64 73 | 62 65 74 77 65 65 6e 6d | seconds|betweenm|
|00000470| 65 73 73 61 67 65 73 20 | 30 0d 0d 57 69 6e 64 6f |essages |0..Windo|
|00000480| 77 50 74 72 20 6d 61 69 | 6e 77 69 6e 64 6f 77 20 |wPtr mai|nwindow |
|00000490| 3d 20 6e 69 6c 3b 20 2f | 2a 74 68 65 20 6d 65 6e |= nil; /|*the men|
|000004a0| 75 20 73 68 61 72 69 6e | 67 20 74 65 73 74 20 77 |u sharin|g test w|
|000004b0| 69 6e 64 6f 77 2a 2f 0d | 0d 53 74 72 32 35 35 20 |indow*/.|.Str255 |
|000004c0| 77 69 6e 64 6f 77 6d 65 | 73 73 61 67 65 3b 20 2f |windowme|ssage; /|
|000004d0| 2a 74 68 65 20 6d 65 73 | 73 61 67 65 20 74 68 61 |*the mes|sage tha|
|000004e0| 74 27 73 20 64 69 73 70 | 6c 61 79 65 64 20 69 6e |t's disp|layed in|
|000004f0| 20 74 68 65 20 6d 61 69 | 6e 20 77 69 6e 64 6f 77 | the mai|n window|
|00000500| 2a 2f 0d 0d 42 6f 6f 6c | 65 61 6e 20 66 6c 65 78 |*/..Bool|ean flex|
|00000510| 69 74 6d 61 69 6e 6c 6f | 6f 70 20 3d 20 66 61 6c |itmainlo|op = fal|
|00000520| 73 65 3b 20 2f 2a 77 68 | 65 6e 20 74 72 75 65 20 |se; /*wh|en true |
|00000530| 77 65 20 66 61 6c 6c 20 | 74 68 72 75 20 74 68 65 |we fall |thru the|
|00000540| 20 6d 61 69 6e 20 65 76 | 65 6e 74 20 6c 6f 6f 70 | main ev|ent loop|
|00000550| 2a 2f 0d 09 0d 09 0d 0d | 0d 73 74 61 74 69 63 20 |*/......|.static |
|00000560| 76 6f 69 64 20 69 6e 69 | 74 6d 61 63 69 6e 74 6f |void ini|tmacinto|
|00000570| 73 68 20 28 76 6f 69 64 | 29 20 7b 0d 0d 09 2f 2a |sh (void|) {.../*|
|00000580| 0d 09 74 68 65 20 6d 61 | 67 69 63 20 73 74 75 66 |..the ma|gic stuf|
|00000590| 66 20 74 68 61 74 20 65 | 76 65 72 79 20 4d 61 63 |f that e|very Mac|
|000005a0| 69 6e 74 6f 73 68 20 61 | 70 70 6c 69 63 61 74 69 |intosh a|pplicati|
|000005b0| 6f 6e 20 6e 65 65 64 73 | 20 74 6f 20 64 6f 20 0d |on needs| to do .|
|000005c0| 09 62 65 66 6f 72 65 20 | 64 6f 69 6e 67 20 61 6e |.before |doing an|
|000005d0| 79 74 68 69 6e 67 20 65 | 6c 73 65 2e 0d 09 2a 2f |ything e|lse...*/|
|000005e0| 0d 0d 09 72 65 67 69 73 | 74 65 72 20 73 68 6f 72 |...regis|ter shor|
|000005f0| 74 20 69 3b 0d 09 09 0d | 09 4d 61 78 41 70 70 6c |t i;....|.MaxAppl|
|00000600| 5a 6f 6e 65 20 28 29 3b | 0d 09 0d 09 66 6f 72 20 |Zone ();|....for |
|00000610| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 31 30 3b 20 |(i = 0; |i < 10; |
|00000620| 69 2b 2b 29 20 0d 09 09 | 4d 6f 72 65 4d 61 73 74 |i++) ...|MoreMast|
|00000630| 65 72 73 20 28 29 3b 0d | 09 0d 09 49 6e 69 74 47 |ers ();.|...InitG|
|00000640| 72 61 66 20 28 26 71 64 | 2e 74 68 65 50 6f 72 74 |raf (&qd|.thePort|
|00000650| 29 3b 0d 09 0d 09 49 6e | 69 74 46 6f 6e 74 73 20 |);....In|itFonts |
|00000660| 28 29 3b 0d 09 0d 09 46 | 6c 75 73 68 45 76 65 6e |();....F|lushEven|
|00000670| 74 73 20 28 65 76 65 72 | 79 45 76 65 6e 74 2c 20 |ts (ever|yEvent, |
|00000680| 30 29 3b 0d 09 0d 09 49 | 6e 69 74 57 69 6e 64 6f |0);....I|nitWindo|
|00000690| 77 73 20 28 29 3b 0d 09 | 0d 09 49 6e 69 74 4d 65 |ws ();..|..InitMe|
|000006a0| 6e 75 73 20 28 29 3b 0d | 09 0d 09 54 45 49 6e 69 |nus ();.|...TEIni|
|000006b0| 74 20 28 29 3b 0d 09 0d | 09 49 6e 69 74 44 69 61 |t ();...|.InitDia|
|000006c0| 6c 6f 67 73 20 28 6e 69 | 6c 29 3b 0d 09 0d 09 49 |logs (ni|l);....I|
|000006d0| 6e 69 74 43 75 72 73 6f | 72 20 28 29 3b 0d 09 0d |nitCurso|r ();...|
|000006e0| 09 66 6f 72 20 28 69 20 | 3d 20 30 3b 20 69 20 3c |.for (i |= 0; i <|
|000006f0| 20 35 3b 20 69 2b 2b 29 | 20 7b 20 2f 2a 72 65 67 | 5; i++)| { /*reg|
|00000700| 69 73 74 65 72 20 77 69 | 74 68 20 4d 75 6c 74 69 |ister wi|th Multi|
|00000710| 66 69 6e 64 65 72 2a 2f | 0d 09 09 0d 09 09 45 76 |finder*/|......Ev|
|00000720| 65 6e 74 52 65 63 6f 72 | 64 20 65 76 3b 0d 09 09 |entRecor|d ev;...|
|00000730| 0d 09 09 45 76 65 6e 74 | 41 76 61 69 6c 20 28 65 |...Event|Avail (e|
|00000740| 76 65 72 79 45 76 65 6e | 74 2c 20 26 65 76 29 3b |veryEven|t, &ev);|
|00000750| 20 2f 2a 73 65 65 20 54 | 4e 31 38 30 20 2d 2d 20 | /*see T|N180 -- |
|00000760| 73 70 6c 61 73 68 20 73 | 63 72 65 65 6e 2a 2f 0d |splash s|creen*/.|
|00000770| 09 09 7d 20 2f 2a 66 6f | 72 2a 2f 0d 09 09 0d 09 |..} /*fo|r*/.....|
|00000780| 44 72 61 77 4d 65 6e 75 | 42 61 72 20 28 29 3b 0d |DrawMenu|Bar ();.|
|00000790| 09 7d 20 2f 2a 69 6e 69 | 74 6d 61 63 69 6e 74 6f |.} /*ini|tmacinto|
|000007a0| 73 68 2a 2f 0d 0d 0d 73 | 74 61 74 69 63 20 76 6f |sh*/...s|tatic vo|
|000007b0| 69 64 20 63 6f 70 79 73 | 74 72 69 6e 67 20 28 53 |id copys|tring (S|
|000007c0| 74 72 32 35 35 20 73 6f | 75 72 63 65 2c 20 53 74 |tr255 so|urce, St|
|000007d0| 72 32 35 35 20 64 65 73 | 74 29 20 7b 0d 0d 09 2f |r255 des|t) {.../|
|000007e0| 2a 0d 09 63 72 65 61 74 | 65 20 61 20 63 6f 70 79 |*..creat|e a copy|
|000007f0| 20 6f 66 20 73 6f 75 72 | 63 65 20 69 6e 20 64 65 | of sour|ce in de|
|00000800| 73 74 2e 20 20 63 6f 70 | 79 20 74 68 65 20 6c 65 |st. cop|y the le|
|00000810| 6e 67 74 68 20 62 79 74 | 65 20 61 6e 64 0d 09 61 |ngth byt|e and..a|
|00000820| 6c 6c 20 74 68 65 20 63 | 68 61 72 61 63 74 65 72 |ll the c|haracter|
|00000830| 73 20 69 6e 20 74 68 65 | 20 73 6f 75 72 63 65 20 |s in the| source |
|00000840| 73 74 72 69 6e 67 2e 0d | 0d 09 61 73 73 75 6d 65 |string..|..assume|
|00000850| 20 74 68 65 20 73 74 72 | 69 6e 67 73 20 61 72 65 | the str|ings are|
|00000860| 20 70 61 73 63 61 6c 20 | 73 74 72 69 6e 67 73 2c | pascal |strings,|
|00000870| 20 77 69 74 68 20 74 68 | 65 20 6c 65 6e 67 74 68 | with th|e length|
|00000880| 20 62 79 74 65 20 69 6e | 0d 09 74 68 65 20 66 69 | byte in|..the fi|
|00000890| 72 73 74 20 63 68 61 72 | 61 63 74 65 72 20 6f 66 |rst char|acter of|
|000008a0| 20 74 68 65 20 73 74 72 | 69 6e 67 2e 0d 09 2a 2f | the str|ing...*/|
|000008b0| 0d 0d 09 72 65 67 69 73 | 74 65 72 20 73 68 6f 72 |...regis|ter shor|
|000008c0| 74 20 69 2c 20 6c 65 6e | 3b 0d 09 0d 09 6c 65 6e |t i, len|;....len|
|000008d0| 20 3d 20 28 73 68 6f 72 | 74 29 20 73 6f 75 72 63 | = (shor|t) sourc|
|000008e0| 65 20 5b 30 5d 3b 0d 09 | 0d 09 66 6f 72 20 28 69 |e [0];..|..for (i|
|000008f0| 20 3d 20 30 3b 20 69 20 | 3c 3d 20 6c 65 6e 3b 20 | = 0; i |<= len; |
|00000900| 69 2b 2b 29 20 0d 09 09 | 64 65 73 74 20 5b 69 5d |i++) ...|dest [i]|
|00000910| 20 3d 20 73 6f 75 72 63 | 65 20 5b 69 5d 3b 0d 09 | = sourc|e [i];..|
|00000920| 7d 20 2f 2a 63 6f 70 79 | 73 74 72 69 6e 67 2a 2f |} /*copy|string*/|
|00000930| 0d 0d 0d 73 74 61 74 69 | 63 20 42 6f 6f 6c 65 61 |...stati|c Boolea|
|00000940| 6e 20 70 75 73 68 73 74 | 72 69 6e 67 20 28 53 74 |n pushst|ring (St|
|00000950| 72 32 35 35 20 62 73 73 | 6f 75 72 63 65 2c 20 53 |r255 bss|ource, S|
|00000960| 74 72 32 35 35 20 62 73 | 64 65 73 74 29 20 7b 0d |tr255 bs|dest) {.|
|00000970| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|00000980| 20 6c 65 6e 73 6f 75 72 | 63 65 20 3d 20 62 73 73 | lensour|ce = bss|
|00000990| 6f 75 72 63 65 20 5b 30 | 5d 3b 0d 09 72 65 67 69 |ource [0|];..regi|
|000009a0| 73 74 65 72 20 73 68 6f | 72 74 20 6c 65 6e 64 65 |ster sho|rt lende|
|000009b0| 73 74 20 3d 20 62 73 64 | 65 73 74 20 5b 30 5d 3b |st = bsd|est [0];|
|000009c0| 0d 09 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 |..regist|er char |
|000009d0| 2a 70 73 6f 75 72 63 65 | 2c 20 2a 70 64 65 73 74 |*psource|, *pdest|
|000009e0| 3b 0d 09 0d 09 69 66 20 | 28 28 6c 65 6e 73 6f 75 |;....if |((lensou|
|000009f0| 72 63 65 20 2b 20 6c 65 | 6e 64 65 73 74 29 20 3e |rce + le|ndest) >|
|00000a00| 20 32 35 35 29 0d 09 09 | 72 65 74 75 72 6e 20 28 | 255)...|return (|
|00000a10| 66 61 6c 73 65 29 3b 0d | 09 09 0d 09 70 64 65 73 |false);.|....pdes|
|00000a20| 74 20 3d 20 28 63 68 61 | 72 20 2a 29 20 62 73 64 |t = (cha|r *) bsd|
|00000a30| 65 73 74 20 2b 20 28 63 | 68 61 72 29 20 6c 65 6e |est + (c|har) len|
|00000a40| 64 65 73 74 20 2b 20 31 | 3b 0d 09 0d 09 70 73 6f |dest + 1|;....pso|
|00000a50| 75 72 63 65 20 3d 20 28 | 63 68 61 72 20 2a 29 20 |urce = (|char *) |
|00000a60| 62 73 73 6f 75 72 63 65 | 20 2b 20 31 3b 0d 09 0d |bssource| + 1;...|
|00000a70| 09 62 73 64 65 73 74 20 | 5b 30 5d 20 2b 3d 20 28 |.bsdest |[0] += (|
|00000a80| 63 68 61 72 29 20 6c 65 | 6e 73 6f 75 72 63 65 3b |char) le|nsource;|
|00000a90| 0d 09 0d 09 77 68 69 6c | 65 20 28 6c 65 6e 73 6f |....whil|e (lenso|
|00000aa0| 75 72 63 65 2d 2d 29 20 | 2a 70 64 65 73 74 2b 2b |urce--) |*pdest++|
|00000ab0| 20 3d 20 2a 70 73 6f 75 | 72 63 65 2b 2b 3b 0d 09 | = *psou|rce++;..|
|00000ac0| 0d 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);|
|00000ad0| 0d 09 7d 20 2f 2a 70 75 | 73 68 73 74 72 69 6e 67 |..} /*pu|shstring|
|00000ae0| 2a 2f 0d 09 0d 09 0d 73 | 74 61 74 69 63 20 42 6f |*/.....s|tatic Bo|
|00000af0| 6f 6c 65 61 6e 20 70 75 | 73 68 6c 6f 6e 67 20 28 |olean pu|shlong (|
|00000b00| 6c 6f 6e 67 20 6e 75 6d | 2c 20 53 74 72 32 35 35 |long num|, Str255|
|00000b10| 20 62 73 64 65 73 74 29 | 20 7b 0d 0d 09 53 74 72 | bsdest)| {...Str|
|00000b20| 32 35 35 20 62 73 69 6e | 74 3b 0d 09 0d 09 4e 75 |255 bsin|t;....Nu|
|00000b30| 6d 54 6f 53 74 72 69 6e | 67 20 28 6e 75 6d 2c 20 |mToStrin|g (num, |
|00000b40| 62 73 69 6e 74 29 3b 0d | 09 0d 09 72 65 74 75 72 |bsint);.|...retur|
|00000b50| 6e 20 28 70 75 73 68 73 | 74 72 69 6e 67 20 28 62 |n (pushs|tring (b|
|00000b60| 73 69 6e 74 2c 20 62 73 | 64 65 73 74 29 29 3b 0d |sint, bs|dest));.|
|00000b70| 09 7d 20 2f 2a 70 75 73 | 68 6c 6f 6e 67 2a 2f 0d |.} /*pus|hlong*/.|
|00000b80| 09 0d 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 65 |...stati|c void e|
|00000b90| 6c 6c 69 70 73 69 7a 65 | 20 28 53 74 72 32 35 35 |llipsize| (Str255|
|00000ba0| 20 73 2c 20 73 68 6f 72 | 74 20 77 69 64 74 68 29 | s, shor|t width)|
|00000bb0| 20 7b 0d 0d 09 2f 2a 0d | 09 69 66 20 74 68 65 20 | {.../*.|.if the |
|00000bc0| 73 74 72 69 6e 67 20 66 | 69 74 73 20 69 6e 73 69 |string f|its insi|
|00000bd0| 64 65 20 74 68 65 20 67 | 69 76 65 6e 20 6e 75 6d |de the g|iven num|
|00000be0| 62 65 72 20 6f 66 20 70 | 69 78 65 6c 73 2c 20 66 |ber of p|ixels, f|
|00000bf0| 69 6e 65 20 2d 2d 20 64 | 6f 20 6e 6f 74 68 69 6e |ine -- d|o nothin|
|00000c00| 67 0d 09 61 6e 64 20 72 | 65 74 75 72 6e 2e 0d 09 |g..and r|eturn...|
|00000c10| 0d 09 69 66 20 6e 6f 74 | 2c 20 72 65 74 75 72 6e |..if not|, return|
|00000c20| 20 61 20 73 74 72 69 6e | 67 20 74 68 61 74 20 64 | a strin|g that d|
|00000c30| 6f 65 73 20 66 69 74 2c | 20 77 69 74 68 20 65 6c |oes fit,| with el|
|00000c40| 6c 69 70 73 65 73 20 72 | 65 70 72 65 73 65 6e 74 |lipses r|epresent|
|00000c50| 69 6e 67 20 74 68 65 20 | 0d 09 64 65 6c 65 74 65 |ing the |..delete|
|00000c60| 64 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 65 |d charac|ters. e|
|00000c70| 6c 6c 69 70 73 65 73 20 | 61 72 65 20 67 65 6e 65 |llipses |are gene|
|00000c80| 72 61 74 65 64 20 62 79 | 20 70 72 65 73 73 69 6e |rated by| pressin|
|00000c90| 67 20 6f 70 74 69 6f 6e | 2d 73 65 6d 69 63 6f 6c |g option|-semicol|
|00000ca0| 6f 6e 2e 0d 09 2a 2f 0d | 09 0d 09 72 65 67 69 73 |on...*/.|...regis|
|00000cb0| 74 65 72 20 63 68 61 72 | 20 6c 65 6e 3b 0d 09 72 |ter char| len;..r|
|00000cc0| 65 67 69 73 74 65 72 20 | 73 68 6f 72 74 20 6e 65 |egister |short ne|
|00000cd0| 77 77 69 64 74 68 3b 0d | 09 0d 09 69 66 20 28 28 |wwidth;.|...if ((|
|00000ce0| 6e 65 77 77 69 64 74 68 | 20 3d 20 53 74 72 69 6e |newwidth| = Strin|
|00000cf0| 67 57 69 64 74 68 20 28 | 73 29 29 20 3c 3d 20 77 |gWidth (|s)) <= w|
|00000d00| 69 64 74 68 29 20 2f 2a | 6e 6f 74 68 69 6e 67 20 |idth) /*|nothing |
|00000d10| 74 6f 20 64 6f 2c 20 74 | 68 65 20 73 74 72 69 6e |to do, t|he strin|
|00000d20| 67 20 66 69 74 73 2a 2f | 0d 09 09 72 65 74 75 72 |g fits*/|...retur|
|00000d30| 6e 3b 0d 09 0d 09 6c 65 | 6e 20 3d 20 73 20 5b 30 |n;....le|n = s [0|
|00000d40| 5d 3b 20 2f 2a 20 63 75 | 72 72 65 6e 74 20 6c 65 |]; /* cu|rrent le|
|00000d50| 6e 67 74 68 20 69 6e 20 | 63 68 61 72 61 63 74 65 |ngth in |characte|
|00000d60| 72 73 2a 2f 0d 09 0d 09 | 77 69 64 74 68 20 2d 3d |rs*/....|width -=|
|00000d70| 20 43 68 61 72 57 69 64 | 74 68 20 28 27 c9 27 29 | CharWid|th ('.')|
|00000d80| 3b 20 2f 2a 20 73 75 62 | 74 72 61 63 74 20 77 69 |; /* sub|tract wi|
|00000d90| 64 74 68 20 6f 66 20 65 | 6c 6c 69 70 73 65 73 2a |dth of e|llipses*|
|00000da0| 2f 0d 09 09 0d 09 64 6f | 20 7b 20 2f 2a 75 6e 74 |/.....do| { /*unt|
|00000db0| 69 6c 20 69 74 20 66 69 | 74 73 20 28 6f 72 20 77 |il it fi|ts (or w|
|00000dc0| 65 20 72 75 6e 20 6f 75 | 74 20 6f 66 20 63 68 61 |e run ou|t of cha|
|00000dd0| 72 61 63 74 65 72 73 29 | 2a 2f 0d 09 0d 09 09 6e |racters)|*/.....n|
|00000de0| 65 77 77 69 64 74 68 20 | 2d 3d 20 43 68 61 72 57 |ewwidth |-= CharW|
|00000df0| 69 64 74 68 20 28 73 20 | 5b 6c 65 6e 5d 29 3b 0d |idth (s |[len]);.|
|00000e00| 09 09 0d 09 09 2d 2d 6c | 65 6e 3b 0d 09 7d 20 77 |.....--l|en;..} w|
|00000e10| 68 69 6c 65 20 28 28 6e | 65 77 77 69 64 74 68 20 |hile ((n|ewwidth |
|00000e20| 3e 20 77 69 64 74 68 29 | 20 26 26 20 28 6c 65 6e |> width)| && (len|
|00000e30| 20 21 3d 20 30 29 29 3b | 0d 09 0d 09 2b 2b 6c 65 | != 0));|....++le|
|00000e40| 6e 3b 20 2f 2a 6d 61 6b | 65 20 72 6f 6f 6d 20 66 |n; /*mak|e room f|
|00000e50| 6f 72 20 74 68 65 20 65 | 6c 6c 69 70 73 65 73 2a |or the e|llipses*|
|00000e60| 2f 0d 09 0d 09 73 20 5b | 6c 65 6e 5d 20 3d 20 27 |/....s [|len] = '|
|00000e70| c9 27 3b 20 0d 09 0d 09 | 73 20 5b 30 5d 20 3d 20 |.'; ....|s [0] = |
|00000e80| 28 63 68 61 72 29 20 6c | 65 6e 3b 0d 09 7d 20 2f |(char) l|en;..} /|
|00000e90| 2a 65 6c 6c 69 70 73 69 | 7a 65 2a 2f 0d 0d 0d 73 |*ellipsi|ze*/...s|
|00000ea0| 74 61 74 69 63 20 76 6f | 69 64 20 63 65 6e 74 65 |tatic vo|id cente|
|00000eb0| 72 73 74 72 69 6e 67 20 | 28 52 65 63 74 20 72 2c |rstring |(Rect r,|
|00000ec0| 20 53 74 72 32 35 35 20 | 73 29 20 7b 0d 09 0d 09 | Str255 |s) {....|
|00000ed0| 2f 2a 0d 09 64 72 61 77 | 20 74 68 65 20 73 74 72 |/*..draw| the str|
|00000ee0| 69 6e 67 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |ing in t|he curre|
|00000ef0| 6e 74 20 66 6f 6e 74 2c | 20 73 69 7a 65 20 61 6e |nt font,| size an|
|00000f00| 64 20 73 74 79 6c 65 2c | 20 63 65 6e 74 65 72 65 |d style,| centere|
|00000f10| 64 20 69 6e 73 69 64 65 | 0d 09 74 68 65 20 69 6e |d inside|..the in|
|00000f20| 64 69 63 61 74 65 64 20 | 72 65 63 74 61 6e 67 6c |dicated |rectangl|
|00000f30| 65 2e 0d 09 2a 2f 0d 09 | 0d 09 72 65 67 69 73 74 |e...*/..|..regist|
|00000f40| 65 72 20 73 68 6f 72 74 | 20 72 68 20 3d 20 72 2e |er short| rh = r.|
|00000f50| 62 6f 74 74 6f 6d 20 2d | 20 72 2e 74 6f 70 3b 0d |bottom -| r.top;.|
|00000f60| 09 72 65 67 69 73 74 65 | 72 20 73 68 6f 72 74 20 |.registe|r short |
|00000f70| 72 77 20 3d 20 72 2e 72 | 69 67 68 74 20 2d 20 72 |rw = r.r|ight - r|
|00000f80| 2e 6c 65 66 74 3b 0d 09 | 72 65 67 69 73 74 65 72 |.left;..|register|
|00000f90| 20 73 68 6f 72 74 20 68 | 2c 20 76 3b 0d 09 46 6f | short h|, v;..Fo|
|00000fa0| 6e 74 49 6e 66 6f 20 66 | 69 3b 0d 09 0d 09 47 65 |ntInfo f|i;....Ge|
|00000fb0| 74 46 6f 6e 74 49 6e 66 | 6f 20 28 26 66 69 29 3b |tFontInf|o (&fi);|
|00000fc0| 0d 09 0d 09 65 6c 6c 69 | 70 73 69 7a 65 20 28 73 |....elli|psize (s|
|00000fd0| 2c 20 72 77 29 3b 20 2f | 2a 6d 61 6b 65 20 73 75 |, rw); /|*make su|
|00000fe0| 72 65 20 69 74 20 66 69 | 74 73 20 69 6e 73 69 64 |re it fi|ts insid|
|00000ff0| 65 20 74 68 65 20 72 65 | 63 74 61 6e 67 6c 65 2c |e the re|ctangle,|
|00001000| 20 77 69 64 74 68 2d 77 | 69 73 65 2a 2f 0d 09 0d | width-w|ise*/...|
|00001010| 09 68 20 3d 20 72 2e 6c | 65 66 74 20 2b 20 28 28 |.h = r.l|eft + ((|
|00001020| 72 77 20 2d 20 53 74 72 | 69 6e 67 57 69 64 74 68 |rw - Str|ingWidth|
|00001030| 20 28 73 29 29 20 2f 20 | 32 29 3b 0d 09 0d 09 76 | (s)) / |2);....v|
|00001040| 20 3d 20 72 2e 74 6f 70 | 20 2b 20 28 28 72 68 20 | = r.top| + ((rh |
|00001050| 2d 20 28 66 69 2e 61 73 | 63 65 6e 74 20 2b 20 66 |- (fi.as|cent + f|
|00001060| 69 2e 64 65 73 63 65 6e | 74 29 29 20 2f 20 32 29 |i.descen|t)) / 2)|
|00001070| 20 2b 20 66 69 2e 61 73 | 63 65 6e 74 3b 0d 09 0d | + fi.as|cent;...|
|00001080| 09 4d 6f 76 65 54 6f 20 | 28 68 2c 20 76 29 3b 0d |.MoveTo |(h, v);.|
|00001090| 09 0d 09 43 6c 69 70 52 | 65 63 74 20 28 26 72 29 |...ClipR|ect (&r)|
|000010a0| 3b 0d 09 0d 09 44 72 61 | 77 53 74 72 69 6e 67 20 |;....Dra|wString |
|000010b0| 28 73 29 3b 0d 09 7d 20 | 2f 2a 63 65 6e 74 65 72 |(s);..} |/*center|
|000010c0| 73 74 72 69 6e 67 2a 2f | 0d 0d 0d 73 74 61 74 69 |string*/|...stati|
|000010d0| 63 20 76 6f 69 64 20 73 | 65 74 66 6f 6e 74 73 69 |c void s|etfontsi|
|000010e0| 7a 65 73 74 79 6c 65 20 | 28 73 68 6f 72 74 20 66 |zestyle |(short f|
|000010f0| 6f 6e 74 6e 75 6d 2c 20 | 73 68 6f 72 74 20 66 6f |ontnum, |short fo|
|00001100| 6e 74 73 69 7a 65 2c 20 | 73 68 6f 72 74 20 66 6f |ntsize, |short fo|
|00001110| 6e 74 73 74 79 6c 65 29 | 20 7b 0d 0d 09 54 65 78 |ntstyle)| {...Tex|
|00001120| 74 46 6f 6e 74 20 28 66 | 6f 6e 74 6e 75 6d 29 3b |tFont (f|ontnum);|
|00001130| 0d 09 0d 09 54 65 78 74 | 53 69 7a 65 20 28 66 6f |....Text|Size (fo|
|00001140| 6e 74 73 69 7a 65 29 3b | 0d 09 0d 09 54 65 78 74 |ntsize);|....Text|
|00001150| 46 61 63 65 20 28 66 6f | 6e 74 73 74 79 6c 65 29 |Face (fo|ntstyle)|
|00001160| 3b 0d 09 7d 20 2f 2a 73 | 65 74 66 6f 6e 74 73 69 |;..} /*s|etfontsi|
|00001170| 7a 65 73 74 79 6c 65 2a | 2f 0d 09 0d 09 0d 73 74 |zestyle*|/.....st|
|00001180| 61 74 69 63 20 76 6f 69 | 64 20 75 70 64 61 74 65 |atic voi|d update|
|00001190| 6d 61 69 6e 77 69 6e 64 | 6f 77 20 28 76 6f 69 64 |mainwind|ow (void|
|000011a0| 29 20 7b 0d 09 0d 09 52 | 65 63 74 20 72 3b 0d 09 |) {....R|ect r;..|
|000011b0| 53 74 72 32 35 35 20 73 | 3b 0d 09 0d 09 72 20 3d |Str255 s|;....r =|
|000011c0| 20 28 2a 6d 61 69 6e 77 | 69 6e 64 6f 77 29 2e 70 | (*mainw|indow).p|
|000011d0| 6f 72 74 52 65 63 74 3b | 0d 09 0d 09 45 72 61 73 |ortRect;|....Eras|
|000011e0| 65 52 65 63 74 20 28 26 | 72 29 3b 0d 09 0d 09 73 |eRect (&|r);....s|
|000011f0| 65 74 66 6f 6e 74 73 69 | 7a 65 73 74 79 6c 65 20 |etfontsi|zestyle |
|00001200| 28 68 65 6c 76 65 74 69 | 63 61 2c 20 31 32 2c 20 |(helveti|ca, 12, |
|00001210| 30 29 3b 0d 09 0d 09 63 | 65 6e 74 65 72 73 74 72 |0);....c|enterstr|
|00001220| 69 6e 67 20 28 72 2c 20 | 77 69 6e 64 6f 77 6d 65 |ing (r, |windowme|
|00001230| 73 73 61 67 65 29 3b 0d | 09 0d 09 4e 75 6d 54 6f |ssage);.|...NumTo|
|00001240| 53 74 72 69 6e 67 20 28 | 46 72 65 65 4d 65 6d 20 |String (|FreeMem |
|00001250| 28 29 20 2f 20 31 30 32 | 34 2c 20 73 29 3b 0d 09 |() / 102|4, s);..|
|00001260| 0d 09 4d 6f 76 65 54 6f | 20 28 72 2e 6c 65 66 74 |..MoveTo| (r.left|
|00001270| 20 2b 20 33 2c 20 72 2e | 62 6f 74 74 6f 6d 20 2d | + 3, r.|bottom -|
|00001280| 20 33 29 3b 0d 09 0d 09 | 73 65 74 66 6f 6e 74 73 | 3);....|setfonts|
|00001290| 69 7a 65 73 74 79 6c 65 | 20 28 67 65 6e 65 76 61 |izestyle| (geneva|
|000012a0| 2c 20 39 2c 20 30 29 3b | 0d 09 0d 09 44 72 61 77 |, 9, 0);|....Draw|
|000012b0| 53 74 72 69 6e 67 20 28 | 73 29 3b 0d 09 0d 09 44 |String (|s);....D|
|000012c0| 72 61 77 53 74 72 69 6e | 67 20 28 22 5c 70 4b 22 |rawStrin|g ("\pK"|
|000012d0| 29 3b 0d 09 7d 20 2f 2a | 75 70 64 61 74 65 6d 61 |);..} /*|updatema|
|000012e0| 69 6e 77 69 6e 64 6f 77 | 2a 2f 0d 09 0d 09 0d 73 |inwindow|*/.....s|
|000012f0| 74 61 74 69 63 20 76 6f | 69 64 20 73 65 74 77 69 |tatic vo|id setwi|
|00001300| 6e 64 6f 77 6d 65 73 73 | 61 67 65 20 28 53 74 72 |ndowmess|age (Str|
|00001310| 32 35 35 20 73 63 72 69 | 70 74 2c 20 53 74 72 32 |255 scri|pt, Str2|
|00001320| 35 35 20 72 65 73 75 6c | 74 29 20 7b 0d 09 0d 09 |55 resul|t) {....|
|00001330| 63 6f 70 79 73 74 72 69 | 6e 67 20 28 73 63 72 69 |copystri|ng (scri|
|00001340| 70 74 2c 20 77 69 6e 64 | 6f 77 6d 65 73 73 61 67 |pt, wind|owmessag|
|00001350| 65 29 3b 0d 09 09 09 0d | 09 70 75 73 68 73 74 72 |e);.....|.pushstr|
|00001360| 69 6e 67 20 28 22 5c 70 | 20 72 65 74 75 72 6e 73 |ing ("\p| returns|
|00001370| 20 22 2c 20 77 69 6e 64 | 6f 77 6d 65 73 73 61 67 | ", wind|owmessag|
|00001380| 65 29 3b 0d 09 09 09 0d | 09 70 75 73 68 73 74 72 |e);.....|.pushstr|
|00001390| 69 6e 67 20 28 72 65 73 | 75 6c 74 2c 20 77 69 6e |ing (res|ult, win|
|000013a0| 64 6f 77 6d 65 73 73 61 | 67 65 29 3b 0d 09 0d 09 |dowmessa|ge);....|
|000013b0| 70 75 73 68 73 74 72 69 | 6e 67 20 28 22 5c 70 22 |pushstri|ng ("\p"|
|000013c0| 2c 20 77 69 6e 64 6f 77 | 6d 65 73 73 61 67 65 29 |, window|message)|
|000013d0| 3b 0d 09 09 09 0d 09 53 | 65 74 50 6f 72 74 20 28 |;......S|etPort (|
|000013e0| 6d 61 69 6e 77 69 6e 64 | 6f 77 29 3b 0d 09 0d 09 |mainwind|ow);....|
|000013f0| 75 70 64 61 74 65 6d 61 | 69 6e 77 69 6e 64 6f 77 |updatema|inwindow|
|00001400| 20 28 29 3b 0d 09 7d 20 | 2f 2a 73 65 74 77 69 6e | ();..} |/*setwin|
|00001410| 64 6f 77 6d 65 73 73 61 | 67 65 2a 2f 0d 0d 0d 73 |dowmessa|ge*/...s|
|00001420| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 69 6e |tatic Bo|olean in|
|00001430| 69 74 6d 61 69 6e 77 69 | 6e 64 6f 77 20 28 76 6f |itmainwi|ndow (vo|
|00001440| 69 64 29 20 7b 0d 09 0d | 09 72 65 67 69 73 74 65 |id) {...|.registe|
|00001450| 72 20 57 69 6e 64 6f 77 | 50 74 72 20 77 3b 0d 09 |r Window|Ptr w;..|
|00001460| 0d 09 77 20 3d 20 6d 61 | 69 6e 77 69 6e 64 6f 77 |..w = ma|inwindow|
|00001470| 20 3d 20 47 65 74 4e 65 | 77 57 69 6e 64 6f 77 20 | = GetNe|wWindow |
|00001480| 28 31 32 38 2c 20 6e 69 | 6c 2c 20 28 57 69 6e 64 |(128, ni|l, (Wind|
|00001490| 6f 77 50 74 72 29 20 2d | 31 29 3b 0d 09 0d 09 69 |owPtr) -|1);....i|
|000014a0| 66 20 28 77 20 3d 3d 20 | 6e 69 6c 29 0d 09 09 72 |f (w == |nil)...r|
|000014b0| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 0d 09 |eturn (f|alse);..|
|000014c0| 0d 09 53 68 6f 77 57 69 | 6e 64 6f 77 20 28 77 29 |..ShowWi|ndow (w)|
|000014d0| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|000014e0| 65 29 3b 0d 09 7d 20 2f | 2a 69 6e 69 74 6d 61 69 |e);..} /|*initmai|
|000014f0| 6e 77 69 6e 64 6f 77 2a | 2f 0d 0d 0d 73 74 61 74 |nwindow*|/...stat|
|00001500| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 73 74 72 69 6e |ic Boole|an strin|
|00001510| 67 74 6f 74 65 78 74 20 | 28 53 74 72 32 35 35 20 |gtotext |(Str255 |
|00001520| 73 2c 20 48 61 6e 64 6c | 65 20 2a 68 74 65 78 74 |s, Handl|e *htext|
|00001530| 29 20 7b 0d 09 0d 09 72 | 65 67 69 73 74 65 72 20 |) {....r|egister |
|00001540| 6c 6f 6e 67 20 6c 65 6e | 3b 0d 09 72 65 67 69 73 |long len|;..regis|
|00001550| 74 65 72 20 48 61 6e 64 | 6c 65 20 68 3b 0d 09 0d |ter Hand|le h;...|
|00001560| 09 6c 65 6e 20 3d 20 73 | 20 5b 30 5d 3b 0d 09 0d |.len = s| [0];...|
|00001570| 09 68 20 3d 20 4e 65 77 | 48 61 6e 64 6c 65 20 28 |.h = New|Handle (|
|00001580| 6c 65 6e 29 3b 0d 09 0d | 09 69 66 20 28 68 20 3d |len);...|.if (h =|
|00001590| 3d 20 6e 69 6c 29 0d 09 | 09 72 65 74 75 72 6e 20 |= nil)..|.return |
|000015a0| 28 66 61 6c 73 65 29 3b | 0d 09 09 0d 09 42 6c 6f |(false);|.....Blo|
|000015b0| 63 6b 4d 6f 76 65 20 28 | 26 73 20 5b 31 5d 2c 20 |ckMove (|&s [1], |
|000015c0| 2a 68 2c 20 6c 65 6e 29 | 3b 0d 09 0d 09 2a 68 74 |*h, len)|;....*ht|
|000015d0| 65 78 74 20 3d 20 68 3b | 0d 09 0d 09 72 65 74 75 |ext = h;|....retu|
|000015e0| 72 6e 20 28 74 72 75 65 | 29 3b 0d 09 7d 20 2f 2a |rn (true|);..} /*|
|000015f0| 73 74 72 69 6e 67 74 6f | 74 65 78 74 2a 2f 0d 09 |stringto|text*/..|
|00001600| 0d 09 0d 73 74 61 74 69 | 63 20 42 6f 6f 6c 65 61 |...stati|c Boolea|
|00001610| 6e 20 74 65 78 74 74 6f | 73 74 72 69 6e 67 20 28 |n textto|string (|
|00001620| 48 61 6e 64 6c 65 20 68 | 74 65 78 74 2c 20 53 74 |Handle h|text, St|
|00001630| 72 32 35 35 20 73 29 20 | 7b 0d 09 0d 09 6c 6f 6e |r255 s) |{....lon|
|00001640| 67 20 6c 65 6e 3b 0d 09 | 0d 09 6c 65 6e 20 3d 20 |g len;..|..len = |
|00001650| 47 65 74 48 61 6e 64 6c | 65 53 69 7a 65 20 28 68 |GetHandl|eSize (h|
|00001660| 74 65 78 74 29 3b 0d 09 | 0d 09 69 66 20 28 6c 65 |text);..|..if (le|
|00001670| 6e 20 3e 20 32 35 35 29 | 0d 09 09 6c 65 6e 20 3d |n > 255)|...len =|
|00001680| 20 32 35 35 3b 0d 09 09 | 0d 09 42 6c 6f 63 6b 4d | 255;...|..BlockM|
|00001690| 6f 76 65 20 28 2a 68 74 | 65 78 74 2c 20 26 73 20 |ove (*ht|ext, &s |
|000016a0| 5b 31 5d 2c 20 6c 65 6e | 29 3b 0d 09 0d 09 73 20 |[1], len|);....s |
|000016b0| 5b 30 5d 20 3d 20 28 63 | 68 61 72 29 20 6c 65 6e |[0] = (c|har) len|
|000016c0| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|000016d0| 65 29 3b 0d 09 7d 20 2f | 2a 74 65 78 74 74 6f 73 |e);..} /|*texttos|
|000016e0| 74 72 69 6e 67 2a 2f 0d | 09 0d 09 0d 73 74 61 74 |tring*/.|....stat|
|000016f0| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 49 41 43 70 75 |ic Boole|an IACpu|
|00001700| 73 68 74 65 78 74 70 61 | 72 61 6d 20 28 41 70 70 |shtextpa|ram (App|
|00001710| 6c 65 45 76 65 6e 74 20 | 2a 65 76 65 6e 74 2c 20 |leEvent |*event, |
|00001720| 48 61 6e 64 6c 65 20 76 | 61 6c 2c 20 4f 53 54 79 |Handle v|al, OSTy|
|00001730| 70 65 20 6b 65 79 77 6f | 72 64 29 20 7b 0d 0d 09 |pe keywo|rd) {...|
|00001740| 41 45 44 65 73 63 20 64 | 65 73 63 3b 0d 09 72 65 |AEDesc d|esc;..re|
|00001750| 67 69 73 74 65 72 20 4f | 53 45 72 72 20 65 63 3b |gister O|SErr ec;|
|00001760| 0d 09 72 65 67 69 73 74 | 65 72 20 6c 6f 6e 67 20 |..regist|er long |
|00001770| 6c 65 6e 3b 0d 09 0d 09 | 64 65 73 63 2e 64 65 73 |len;....|desc.des|
|00001780| 63 72 69 70 74 6f 72 54 | 79 70 65 20 3d 20 27 54 |criptorT|ype = 'T|
|00001790| 45 58 54 27 3b 0d 09 0d | 09 64 65 73 63 2e 64 61 |EXT';...|.desc.da|
|000017a0| 74 61 48 61 6e 64 6c 65 | 20 3d 20 76 61 6c 3b 0d |taHandle| = val;.|
|000017b0| 09 0d 09 65 63 20 3d 20 | 41 45 50 75 74 50 61 72 |...ec = |AEPutPar|
|000017c0| 61 6d 44 65 73 63 20 28 | 65 76 65 6e 74 2c 20 28 |amDesc (|event, (|
|000017d0| 41 45 4b 65 79 77 6f 72 | 64 29 20 6b 65 79 77 6f |AEKeywor|d) keywo|
|000017e0| 72 64 2c 20 26 64 65 73 | 63 29 3b 0d 09 0d 09 72 |rd, &des|c);....r|
|000017f0| 65 74 75 72 6e 20 28 65 | 63 20 3d 3d 20 6e 6f 45 |eturn (e|c == noE|
|00001800| 72 72 29 3b 0d 09 7d 20 | 2f 2a 49 41 43 70 75 73 |rr);..} |/*IACpus|
|00001810| 68 74 65 78 74 70 61 72 | 61 6d 2a 2f 0d 0d 0d 73 |htextpar|am*/...s|
|00001820| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 49 41 |tatic Bo|olean IA|
|00001830| 43 67 65 74 74 65 78 74 | 70 61 72 61 6d 20 28 41 |Cgettext|param (A|
|00001840| 70 70 6c 65 45 76 65 6e | 74 20 2a 65 76 65 6e 74 |ppleEven|t *event|
|00001850| 2c 20 4f 53 54 79 70 65 | 20 6b 65 79 77 6f 72 64 |, OSType| keyword|
|00001860| 2c 20 48 61 6e 64 6c 65 | 20 2a 68 74 65 78 74 29 |, Handle| *htext)|
|00001870| 20 7b 0d 09 0d 09 41 45 | 44 65 73 63 20 72 65 73 | {....AE|Desc res|
|00001880| 75 6c 74 3b 0d 09 4f 53 | 45 72 72 20 65 63 3b 0d |ult;..OS|Err ec;.|
|00001890| 09 42 6f 6f 6c 65 61 6e | 20 66 6c 3b 0d 09 0d 09 |.Boolean| fl;....|
|000018a0| 65 63 20 3d 20 41 45 47 | 65 74 50 61 72 61 6d 44 |ec = AEG|etParamD|
|000018b0| 65 73 63 20 28 65 76 65 | 6e 74 2c 20 28 41 45 4b |esc (eve|nt, (AEK|
|000018c0| 65 79 77 6f 72 64 29 20 | 6b 65 79 77 6f 72 64 2c |eyword) |keyword,|
|000018d0| 20 27 54 45 58 54 27 2c | 20 26 72 65 73 75 6c 74 | 'TEXT',| &result|
|000018e0| 29 3b 0d 09 0d 09 69 66 | 20 28 65 63 20 21 3d 20 |);....if| (ec != |
|000018f0| 6e 6f 45 72 72 29 0d 09 | 09 72 65 74 75 72 6e 20 |noErr)..|.return |
|00001900| 28 66 61 6c 73 65 29 3b | 0d 09 09 0d 09 2a 68 74 |(false);|.....*ht|
|00001910| 65 78 74 20 3d 20 72 65 | 73 75 6c 74 2e 64 61 74 |ext = re|sult.dat|
|00001920| 61 48 61 6e 64 6c 65 3b | 0d 09 0d 09 66 6c 20 3d |aHandle;|....fl =|
|00001930| 20 48 61 6e 64 54 6f 48 | 61 6e 64 20 28 68 74 65 | HandToH|and (hte|
|00001940| 78 74 29 20 3d 3d 20 6e | 6f 45 72 72 3b 0d 09 0d |xt) == n|oErr;...|
|00001950| 09 41 45 44 69 73 70 6f | 73 65 44 65 73 63 20 28 |.AEDispo|seDesc (|
|00001960| 26 72 65 73 75 6c 74 29 | 3b 0d 09 0d 09 72 65 74 |&result)|;....ret|
|00001970| 75 72 6e 20 28 66 6c 29 | 3b 0d 09 7d 20 2f 2a 49 |urn (fl)|;..} /*I|
|00001980| 41 43 67 65 74 74 65 78 | 74 70 61 72 61 6d 2a 2f |ACgettex|tparam*/|
|00001990| 0d 0d 0d 73 74 61 74 69 | 63 20 42 6f 6f 6c 65 61 |...stati|c Boolea|
|000019a0| 6e 20 49 41 43 65 72 72 | 6f 72 72 65 70 6c 79 20 |n IACerr|orreply |
|000019b0| 28 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 72 65 70 |(AppleEv|ent *rep|
|000019c0| 6c 79 2c 20 53 74 72 32 | 35 35 20 65 72 72 6f 72 |ly, Str2|55 error|
|000019d0| 73 74 72 69 6e 67 29 20 | 7b 0d 09 0d 09 2f 2a 0d |string) |{..../*.|
|000019e0| 09 72 65 74 75 72 6e 20 | 74 72 75 65 20 69 66 20 |.return |true if |
|000019f0| 74 68 65 20 72 65 70 6c | 79 20 69 73 20 61 6e 20 |the repl|y is an |
|00001a00| 65 72 72 6f 72 20 2d 2d | 20 69 66 20 73 6f 20 69 |error --| if so i|
|00001a10| 74 20 68 61 73 20 61 6e | 20 27 65 72 72 6e 27 20 |t has an| 'errn' |
|00001a20| 76 61 6c 75 65 0d 09 61 | 6e 64 20 61 6e 20 27 65 |value..a|nd an 'e|
|00001a30| 72 72 73 27 20 76 61 6c | 75 65 2e 20 69 66 20 77 |rrs' val|ue. if w|
|00001a40| 65 20 72 65 74 75 72 6e | 20 66 61 6c 73 65 2c 20 |e return| false, |
|00001a50| 74 68 65 20 72 65 70 6c | 79 20 69 73 20 6e 6f 74 |the repl|y is not|
|00001a60| 20 61 6e 20 65 72 72 6f | 72 2e 0d 09 2a 2f 0d 09 | an erro|r...*/..|
|00001a70| 0d 09 4f 53 45 72 72 20 | 65 63 3b 0d 09 41 45 44 |..OSErr |ec;..AED|
|00001a80| 65 73 63 20 64 65 73 63 | 3b 0d 09 0d 09 65 63 20 |esc desc|;....ec |
|00001a90| 3d 20 41 45 47 65 74 50 | 61 72 61 6d 44 65 73 63 |= AEGetP|aramDesc|
|00001aa0| 20 28 72 65 70 6c 79 2c | 20 28 41 45 4b 65 79 77 | (reply,| (AEKeyw|
|00001ab0| 6f 72 64 29 20 27 65 72 | 72 6e 27 2c 20 27 73 68 |ord) 'er|rn', 'sh|
|00001ac0| 6f 72 27 2c 20 26 64 65 | 73 63 29 3b 0d 09 0d 09 |or', &de|sc);....|
|00001ad0| 69 66 20 28 65 63 20 21 | 3d 20 6e 6f 45 72 72 29 |if (ec !|= noErr)|
|00001ae0| 20 2f 2a 74 68 65 20 72 | 65 70 6c 79 20 69 73 6e | /*the r|eply isn|
|00001af0| 27 74 20 61 6e 20 65 72 | 72 6f 72 2a 2f 0d 09 09 |'t an er|ror*/...|
|00001b00| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 0d |return (|false);.|
|00001b10| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 20 |..AEDisp|oseDesc |
|00001b20| 28 26 64 65 73 63 29 3b | 0d 09 0d 09 65 63 20 3d |(&desc);|....ec =|
|00001b30| 20 41 45 47 65 74 50 61 | 72 61 6d 44 65 73 63 20 | AEGetPa|ramDesc |
|00001b40| 28 72 65 70 6c 79 2c 20 | 28 41 45 4b 65 79 77 6f |(reply, |(AEKeywo|
|00001b50| 72 64 29 20 27 65 72 72 | 73 27 2c 20 27 54 45 58 |rd) 'err|s', 'TEX|
|00001b60| 54 27 2c 20 26 64 65 73 | 63 29 3b 0d 09 0d 09 69 |T', &des|c);....i|
|00001b70| 66 20 28 65 63 20 21 3d | 20 6e 6f 45 72 72 29 20 |f (ec !=| noErr) |
|00001b80| 7b 0d 09 09 0d 09 09 63 | 6f 70 79 73 74 72 69 6e |{......c|opystrin|
|00001b90| 67 20 28 22 5c 70 55 6e | 6b 6e 6f 77 6e 20 65 72 |g ("\pUn|known er|
|00001ba0| 72 6f 72 2e 22 2c 20 65 | 72 72 6f 72 73 74 72 69 |ror.", e|rrorstri|
|00001bb0| 6e 67 29 3b 0d 09 09 0d | 09 09 72 65 74 75 72 6e |ng);....|..return|
|00001bc0| 20 28 74 72 75 65 29 3b | 0d 09 09 7d 0d 09 65 6c | (true);|...}..el|
|00001bd0| 73 65 0d 09 09 74 65 78 | 74 74 6f 73 74 72 69 6e |se...tex|ttostrin|
|00001be0| 67 20 28 64 65 73 63 2e | 64 61 74 61 48 61 6e 64 |g (desc.|dataHand|
|00001bf0| 6c 65 2c 20 65 72 72 6f | 72 73 74 72 69 6e 67 29 |le, erro|rstring)|
|00001c00| 3b 0d 09 0d 09 41 45 44 | 69 73 70 6f 73 65 44 65 |;....AED|isposeDe|
|00001c10| 73 63 20 28 26 64 65 73 | 63 29 3b 0d 09 0d 09 72 |sc (&des|c);....r|
|00001c20| 65 74 75 72 6e 20 28 74 | 72 75 65 29 3b 20 2f 2a |eturn (t|rue); /*|
|00001c30| 74 68 65 72 65 20 77 61 | 73 20 61 6e 20 65 72 72 |there wa|s an err|
|00001c40| 6f 72 20 72 65 74 75 72 | 6e 65 64 2a 2f 0d 09 7d |or retur|ned*/..}|
|00001c50| 20 2f 2a 49 41 43 65 72 | 72 6f 72 72 65 70 6c 79 | /*IACer|rorreply|
|00001c60| 2a 2f 0d 09 0d 0d 73 74 | 61 74 69 63 20 70 61 73 |*/....st|atic pas|
|00001c70| 63 61 6c 20 73 68 6f 72 | 74 20 57 61 69 74 52 6f |cal shor|t WaitRo|
|00001c80| 75 74 69 6e 65 20 28 65 | 76 2c 20 73 6c 65 65 70 |utine (e|v, sleep|
|00001c90| 2c 20 6d 6f 75 73 65 72 | 67 6e 29 20 45 76 65 6e |, mouser|gn) Even|
|00001ca0| 74 52 65 63 6f 72 64 20 | 2a 65 76 3b 20 6c 6f 6e |tRecord |*ev; lon|
|00001cb0| 67 20 2a 73 6c 65 65 70 | 3b 20 52 67 6e 48 61 6e |g *sleep|; RgnHan|
|00001cc0| 64 6c 65 20 2a 6d 6f 75 | 73 65 72 67 6e 3b 20 7b |dle *mou|sergn; {|
|00001cd0| 0d 09 0d 09 72 65 74 75 | 72 6e 20 28 30 29 3b 20 |....retu|rn (0); |
|00001ce0| 2f 2a 6b 65 65 70 20 77 | 61 69 74 69 6e 67 2a 2f |/*keep w|aiting*/|
|00001cf0| 0d 09 7d 20 2f 2a 57 61 | 69 74 52 6f 75 74 69 6e |..} /*Wa|itRoutin|
|00001d00| 65 2a 2f 0d 09 0d 0d 73 | 74 61 74 69 63 20 42 6f |e*/....s|tatic Bo|
|00001d10| 6f 6c 65 61 6e 20 46 72 | 6f 6e 74 69 65 72 44 6f |olean Fr|ontierDo|
|00001d20| 53 63 72 69 70 74 20 28 | 53 74 72 32 35 35 20 73 |Script (|Str255 s|
|00001d30| 63 72 69 70 74 2c 20 53 | 74 72 32 35 35 20 72 65 |cript, S|tr255 re|
|00001d40| 74 75 72 6e 73 29 20 7b | 0d 09 0d 09 2f 2a 0d 09 |turns) {|..../*..|
|00001d50| 53 65 6e 64 20 61 20 44 | 6f 20 53 63 72 69 70 74 |Send a D|o Script|
|00001d60| 20 6d 65 73 73 61 67 65 | 20 74 6f 20 46 72 6f 6e | message| to Fron|
|00001d70| 74 69 65 72 2e 20 54 68 | 65 20 66 69 72 73 74 20 |tier. Th|e first |
|00001d80| 70 61 72 61 6d 65 74 65 | 72 20 63 6f 6e 74 61 69 |paramete|r contai|
|00001d90| 6e 73 20 61 20 73 68 6f | 72 74 0d 09 73 63 72 69 |ns a sho|rt..scri|
|00001da0| 70 74 20 74 6f 20 62 65 | 20 72 75 6e 2e 20 54 68 |pt to be| run. Th|
|00001db0| 65 20 73 65 63 6f 6e 64 | 20 70 61 72 61 6d 65 74 |e second| paramet|
|00001dc0| 65 72 20 69 73 20 74 68 | 65 20 73 74 72 69 6e 67 |er is th|e string|
|00001dd0| 20 74 68 61 74 20 46 72 | 6f 6e 74 69 65 72 20 72 | that Fr|ontier r|
|00001de0| 65 74 75 72 6e 65 64 20 | 0d 09 61 73 20 74 68 65 |eturned |..as the|
|00001df0| 20 76 61 6c 75 65 20 67 | 65 6e 65 72 61 74 65 64 | value g|enerated|
|00001e00| 20 62 79 20 72 75 6e 6e | 69 6e 67 20 74 68 65 20 | by runn|ing the |
|00001e10| 73 63 72 69 70 74 2e 20 | 0d 09 0d 09 52 65 74 75 |script. |....Retu|
|00001e20| 72 6e 73 20 74 72 75 65 | 20 69 66 20 77 65 20 77 |rns true| if we w|
|00001e30| 65 72 65 20 61 62 6c 65 | 20 74 6f 20 73 65 6e 64 |ere able| to send|
|00001e40| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 74 6f 20 | the mes|sage to |
|00001e50| 46 72 6f 6e 74 69 65 72 | 2c 20 61 6e 64 20 46 72 |Frontier|, and Fr|
|00001e60| 6f 6e 74 69 65 72 0d 09 | 77 61 73 20 61 62 6c 65 |ontier..|was able|
|00001e70| 20 74 6f 20 63 6f 6d 70 | 69 6c 65 20 61 6e 64 20 | to comp|ile and |
|00001e80| 72 75 6e 20 74 68 65 20 | 73 63 72 69 70 74 20 61 |run the |script a|
|00001e90| 6e 64 20 46 72 6f 6e 74 | 69 65 72 20 72 65 70 6c |nd Front|ier repl|
|00001ea0| 69 65 64 20 77 69 74 68 | 20 61 20 72 65 74 75 72 |ied with| a retur|
|00001eb0| 6e 65 64 0d 09 76 61 6c | 75 65 2e 20 46 72 6f 6e |ned..val|ue. Fron|
|00001ec0| 74 69 65 72 44 6f 53 63 | 72 69 70 74 20 72 65 74 |tierDoSc|ript ret|
|00001ed0| 75 72 6e 73 20 66 61 6c | 73 65 20 69 66 20 46 72 |urns fal|se if Fr|
|00001ee0| 6f 6e 74 69 65 72 20 69 | 73 6e 27 74 20 72 75 6e |ontier i|sn't run|
|00001ef0| 6e 69 6e 67 2c 20 6f 72 | 20 69 66 20 74 68 65 0d |ning, or| if the.|
|00001f00| 09 73 63 72 69 70 74 20 | 64 69 64 6e 27 74 20 63 |.script |didn't c|
|00001f10| 6f 6d 70 69 6c 65 20 6f | 72 20 69 66 20 74 68 65 |ompile o|r if the|
|00001f20| 72 65 20 77 61 73 20 61 | 20 63 6f 6d 6d 75 6e 69 |re was a| communi|
|00001f30| 63 61 74 69 6f 6e 73 20 | 65 72 72 6f 72 2e 0d 09 |cations |error...|
|00001f40| 0d 09 46 72 6f 6e 74 69 | 65 72 20 69 73 20 6e 6f |..Fronti|er is no|
|00001f50| 74 20 6c 69 6d 69 74 65 | 64 20 74 6f 20 72 75 6e |t limite|d to run|
|00001f60| 6e 69 6e 67 20 32 35 35 | 2d 63 68 61 72 61 63 74 |ning 255|-charact|
|00001f70| 65 72 20 73 63 72 69 70 | 74 73 20 6f 72 20 72 65 |er scrip|ts or re|
|00001f80| 74 75 72 6e 69 6e 67 20 | 0d 09 32 35 35 2d 63 68 |turning |..255-ch|
|00001f90| 61 72 61 63 74 65 72 20 | 72 65 74 75 72 6e 65 64 |aracter |returned|
|00001fa0| 20 76 61 6c 75 65 73 2e | 20 54 68 69 73 20 72 6f | values.| This ro|
|00001fb0| 75 74 69 6e 65 20 63 61 | 6e 20 65 61 73 69 6c 79 |utine ca|n easily|
|00001fc0| 20 62 65 20 65 6e 68 61 | 6e 63 65 64 20 74 6f 20 | be enha|nced to |
|00001fd0| 68 61 6e 64 6c 65 20 0d | 09 6c 61 72 67 65 72 20 |handle .|.larger |
|00001fe0| 73 63 72 69 70 74 73 20 | 61 6e 64 20 72 65 74 75 |scripts |and retu|
|00001ff0| 72 6e 65 64 20 76 61 6c | 75 65 73 2e 20 0d 09 0d |rned val|ues. ...|
|00002000| 09 31 31 2f 36 2f 39 31 | 20 44 57 3a 20 53 65 74 |.11/6/91| DW: Set|
|00002010| 20 72 65 74 75 72 6e 20 | 73 74 72 69 6e 67 20 74 | return |string t|
|00002020| 6f 20 22 49 41 43 20 45 | 72 72 6f 72 22 20 69 66 |o "IAC E|rror" if|
|00002030| 20 77 65 20 66 61 69 6c | 65 64 20 74 6f 20 63 72 | we fail|ed to cr|
|00002040| 65 61 74 65 20 61 6e 20 | 41 70 70 6c 65 0d 09 65 |eate an |Apple..e|
|00002050| 76 65 6e 74 20 64 65 73 | 63 72 69 70 74 6f 72 20 |vent des|criptor |
|00002060| 6f 72 20 69 66 20 74 68 | 65 20 73 65 6e 64 20 66 |or if th|e send f|
|00002070| 61 69 6c 65 64 2e 20 57 | 65 27 72 65 20 6e 6f 74 |ailed. W|e're not|
|00002080| 20 73 75 67 67 65 73 74 | 69 6e 67 20 74 68 61 74 | suggest|ing that|
|00002090| 20 79 6f 75 72 0d 09 65 | 72 72 6f 72 20 6d 65 73 | your..e|rror mes|
|000020a0| 73 61 67 65 73 20 73 68 | 6f 75 6c 64 20 62 65 20 |sages sh|ould be |
|000020b0| 73 6f 20 62 72 69 65 66 | 2c 20 72 61 74 68 65 72 |so brief|, rather|
|000020c0| 20 74 68 65 79 20 73 68 | 6f 75 6c 64 20 62 65 20 | they sh|ould be |
|000020d0| 63 75 73 74 6f 6d 2d 66 | 69 74 20 74 6f 20 74 68 |custom-f|it to th|
|000020e0| 65 0d 09 61 70 70 72 6f | 70 72 69 61 74 65 20 61 |e..appro|priate a|
|000020f0| 75 64 69 65 6e 63 65 2e | 20 48 65 72 65 2c 20 77 |udience.| Here, w|
|00002100| 65 20 77 61 6e 74 20 74 | 6f 20 73 68 6f 77 20 79 |e want t|o show y|
|00002110| 6f 75 20 68 6f 77 20 74 | 6f 20 6c 6f 63 61 74 65 |ou how t|o locate|
|00002120| 20 65 72 72 6f 72 73 20 | 72 65 6c 61 74 69 6e 67 | errors |relating|
|00002130| 0d 09 74 6f 20 74 68 65 | 20 49 41 43 20 63 68 61 |..to the| IAC cha|
|00002140| 6e 6e 65 6c 20 2d 2d 20 | 65 69 74 68 65 72 20 79 |nnel -- |either y|
|00002150| 6f 75 27 72 65 20 6c 6f | 77 20 6f 6e 20 6d 65 6d |ou're lo|w on mem|
|00002160| 6f 72 79 2c 20 6f 72 20 | 74 68 65 20 41 70 70 6c |ory, or |the Appl|
|00002170| 65 20 45 76 65 6e 74 20 | 4d 61 6e 61 67 65 72 0d |e Event |Manager.|
|00002180| 09 69 73 6e 27 74 20 70 | 72 65 73 65 6e 74 2c 20 |.isn't p|resent, |
|00002190| 6f 72 20 46 72 6f 6e 74 | 69 65 72 20 69 73 6e 27 |or Front|ier isn'|
|000021a0| 74 20 72 75 6e 6e 69 6e | 67 2e 20 57 61 74 63 68 |t runnin|g. Watch|
|000021b0| 20 66 6f 72 20 74 68 69 | 73 20 73 74 72 69 6e 67 | for thi|s string|
|000021c0| 20 69 6e 20 46 44 53 27 | 73 20 0d 09 6c 69 74 74 | in FDS'|s ..litt|
|000021d0| 6c 65 20 77 69 6e 64 6f | 77 2e 2e 2e 0d 09 2a 2f |le windo|w.....*/|
|000021e0| 0d 0d 09 72 65 67 69 73 | 74 65 72 20 4f 53 45 72 |...regis|ter OSEr|
|000021f0| 72 20 65 63 3b 0d 09 41 | 45 41 64 64 72 65 73 73 |r ec;..A|EAddress|
|00002200| 44 65 73 63 20 61 64 72 | 3b 20 0d 09 41 70 70 6c |Desc adr|; ..Appl|
|00002210| 65 45 76 65 6e 74 20 65 | 76 65 6e 74 2c 20 72 65 |eEvent e|vent, re|
|00002220| 70 6c 79 3b 0d 09 4f 53 | 54 79 70 65 20 69 64 66 |ply;..OS|Type idf|
|00002230| 72 6f 6e 74 69 65 72 3b | 0d 09 48 61 6e 64 6c 65 |rontier;|..Handle|
|00002240| 20 68 74 65 78 74 20 3d | 20 6e 69 6c 3b 0d 09 72 | htext =| nil;..r|
|00002250| 65 67 69 73 74 65 72 20 | 42 6f 6f 6c 65 61 6e 20 |egister |Boolean |
|00002260| 66 6c 68 61 76 65 72 65 | 70 6c 79 20 3d 20 66 61 |flhavere|ply = fa|
|00002270| 6c 73 65 3b 0d 09 0d 09 | 63 6f 70 79 73 74 72 69 |lse;....|copystri|
|00002280| 6e 67 20 28 22 5c 70 49 | 41 43 20 45 72 72 6f 72 |ng ("\pI|AC Error|
|00002290| 2e 22 2c 20 72 65 74 75 | 72 6e 73 29 3b 20 2f 2a |.", retu|rns); /*|
|000022a0| 64 65 66 61 75 6c 74 20 | 72 65 74 75 72 6e 20 73 |default |return s|
|000022b0| 74 72 69 6e 67 2a 2f 0d | 09 0d 09 69 64 66 72 6f |tring*/.|...idfro|
|000022c0| 6e 74 69 65 72 20 3d 20 | 27 4c 41 4e 44 27 3b 0d |ntier = |'LAND';.|
|000022d0| 09 0d 09 65 63 20 3d 20 | 41 45 43 72 65 61 74 65 |...ec = |AECreate|
|000022e0| 44 65 73 63 20 28 74 79 | 70 65 41 70 70 6c 53 69 |Desc (ty|peApplSi|
|000022f0| 67 6e 61 74 75 72 65 2c | 20 28 50 74 72 29 20 26 |gnature,| (Ptr) &|
|00002300| 69 64 66 72 6f 6e 74 69 | 65 72 2c 20 73 69 7a 65 |idfronti|er, size|
|00002310| 6f 66 20 28 69 64 66 72 | 6f 6e 74 69 65 72 29 2c |of (idfr|ontier),|
|00002320| 20 26 61 64 72 29 3b 0d | 09 0d 09 69 66 20 28 65 | &adr);.|...if (e|
|00002330| 63 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 72 65 |c != noE|rr)...re|
|00002340| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 0d |turn (fa|lse);...|
|00002350| 09 65 63 20 3d 20 41 45 | 43 72 65 61 74 65 41 70 |.ec = AE|CreateAp|
|00002360| 70 6c 65 45 76 65 6e 74 | 20 28 0d 09 09 0d 09 09 |pleEvent| (......|
|00002370| 27 6d 69 73 63 27 2c 20 | 27 64 6f 73 63 27 2c 20 |'misc', |'dosc', |
|00002380| 26 61 64 72 2c 20 6b 41 | 75 74 6f 47 65 6e 65 72 |&adr, kA|utoGener|
|00002390| 61 74 65 52 65 74 75 72 | 6e 49 44 2c 20 0d 09 09 |ateRetur|nID, ...|
|000023a0| 0d 09 09 6b 41 6e 79 54 | 72 61 6e 73 61 63 74 69 |...kAnyT|ransacti|
|000023b0| 6f 6e 49 44 2c 20 26 65 | 76 65 6e 74 29 3b 0d 09 |onID, &e|vent);..|
|000023c0| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 20 |..AEDisp|oseDesc |
|000023d0| 28 26 61 64 72 29 3b 0d | 09 0d 09 69 66 20 28 65 |(&adr);.|...if (e|
|000023e0| 63 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 72 65 |c != noE|rr)...re|
|000023f0| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00002400| 0d 09 69 66 20 28 21 73 | 74 72 69 6e 67 74 6f 74 |..if (!s|tringtot|
|00002410| 65 78 74 20 28 73 63 72 | 69 70 74 2c 20 26 68 74 |ext (scr|ipt, &ht|
|00002420| 65 78 74 29 29 0d 09 09 | 72 65 74 75 72 6e 20 28 |ext))...|return (|
|00002430| 66 61 6c 73 65 29 3b 0d | 09 09 0d 09 69 66 20 28 |false);.|....if (|
|00002440| 21 49 41 43 70 75 73 68 | 74 65 78 74 70 61 72 61 |!IACpush|textpara|
|00002450| 6d 20 28 26 65 76 65 6e | 74 2c 20 68 74 65 78 74 |m (&even|t, htext|
|00002460| 2c 20 27 2d 2d 2d 2d 27 | 29 29 20 7b 0d 09 09 0d |, '----'|)) {....|
|00002470| 09 09 44 69 73 70 6f 73 | 65 48 61 6e 64 6c 65 20 |..Dispos|eHandle |
|00002480| 28 68 74 65 78 74 29 3b | 0d 09 09 0d 09 09 72 65 |(htext);|......re|
|00002490| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|000024a0| 7d 0d 09 0d 09 44 69 73 | 70 6f 73 65 48 61 6e 64 |}....Dis|poseHand|
|000024b0| 6c 65 20 28 68 74 65 78 | 74 29 3b 0d 09 0d 09 65 |le (htex|t);....e|
|000024c0| 63 20 3d 20 41 45 53 65 | 6e 64 20 28 0d 09 09 0d |c = AESe|nd (....|
|000024d0| 09 09 26 65 76 65 6e 74 | 2c 20 26 72 65 70 6c 79 |..&event|, &reply|
|000024e0| 2c 20 6b 41 45 57 61 69 | 74 52 65 70 6c 79 20 2b |, kAEWai|tReply +|
|000024f0| 20 6b 41 45 43 61 6e 49 | 6e 74 65 72 61 63 74 20 | kAECanI|nteract |
|00002500| 2b 20 6b 41 45 43 61 6e | 53 77 69 74 63 68 4c 61 |+ kAECan|SwitchLa|
|00002510| 79 65 72 2c 20 0d 09 09 | 0d 09 09 6b 41 45 48 69 |yer, ...|...kAEHi|
|00002520| 67 68 50 72 69 6f 72 69 | 74 79 2c 20 6b 4e 6f 54 |ghPriori|ty, kNoT|
|00002530| 69 6d 65 4f 75 74 2c 20 | 28 50 72 6f 63 50 74 72 |imeOut, |(ProcPtr|
|00002540| 29 20 57 61 69 74 52 6f | 75 74 69 6e 65 2c 20 6e |) WaitRo|utine, n|
|00002550| 69 6c 29 3b 0d 09 0d 09 | 69 66 20 28 65 63 20 21 |il);....|if (ec !|
|00002560| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 67 6f 74 6f 20 |= noErr)|...goto |
|00002570| 65 72 72 6f 72 3b 0d 09 | 09 0d 09 66 6c 68 61 76 |error;..|...flhav|
|00002580| 65 72 65 70 6c 79 20 3d | 20 74 72 75 65 3b 0d 09 |ereply =| true;..|
|00002590| 0d 09 69 66 20 28 49 41 | 43 65 72 72 6f 72 72 65 |..if (IA|Cerrorre|
|000025a0| 70 6c 79 20 28 26 72 65 | 70 6c 79 2c 20 72 65 74 |ply (&re|ply, ret|
|000025b0| 75 72 6e 73 29 29 20 2f | 2a 73 79 6e 74 61 78 20 |urns)) /|*syntax |
|000025c0| 65 72 72 6f 72 20 6f 72 | 20 72 75 6e 74 69 6d 65 |error or| runtime|
|000025d0| 20 65 72 72 6f 72 2a 2f | 0d 09 09 67 6f 74 6f 20 | error*/|...goto |
|000025e0| 65 72 72 6f 72 3b 0d 09 | 09 0d 09 69 66 20 28 49 |error;..|...if (I|
|000025f0| 41 43 67 65 74 74 65 78 | 74 70 61 72 61 6d 20 28 |ACgettex|tparam (|
|00002600| 26 72 65 70 6c 79 2c 20 | 27 2d 2d 2d 2d 27 2c 20 |&reply, |'----', |
|00002610| 26 68 74 65 78 74 29 29 | 20 7b 0d 09 0d 09 09 74 |&htext))| {.....t|
|00002620| 65 78 74 74 6f 73 74 72 | 69 6e 67 20 28 68 74 65 |exttostr|ing (hte|
|00002630| 78 74 2c 20 72 65 74 75 | 72 6e 73 29 3b 0d 09 0d |xt, retu|rns);...|
|00002640| 09 09 44 69 73 70 6f 73 | 65 48 61 6e 64 6c 65 20 |..Dispos|eHandle |
|00002650| 28 68 74 65 78 74 29 3b | 0d 09 09 7d 0d 09 0d 09 |(htext);|...}....|
|00002660| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 20 28 26 |AEDispos|eDesc (&|
|00002670| 65 76 65 6e 74 29 3b 09 | 0d 09 0d 09 41 45 44 69 |event);.|....AEDi|
|00002680| 73 70 6f 73 65 44 65 73 | 63 20 28 26 72 65 70 6c |sposeDes|c (&repl|
|00002690| 79 29 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 28 74 |y);....r|eturn (t|
|000026a0| 72 75 65 29 3b 0d 09 0d | 09 65 72 72 6f 72 3a 0d |rue);...|.error:.|
|000026b0| 09 0d 09 41 45 44 69 73 | 70 6f 73 65 44 65 73 63 |...AEDis|poseDesc|
|000026c0| 20 28 26 65 76 65 6e 74 | 29 3b 09 0d 09 0d 09 69 | (&event|);.....i|
|000026d0| 66 20 28 66 6c 68 61 76 | 65 72 65 70 6c 79 29 0d |f (flhav|ereply).|
|000026e0| 09 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 20 |..AEDisp|oseDesc |
|000026f0| 28 26 72 65 70 6c 79 29 | 3b 0d 09 0d 09 72 65 74 |(&reply)|;....ret|
|00002700| 75 72 6e 20 28 66 61 6c | 73 65 29 3b 0d 09 7d 20 |urn (fal|se);..} |
|00002710| 2f 2a 46 72 6f 6e 74 69 | 65 72 44 6f 53 63 72 69 |/*Fronti|erDoScri|
|00002720| 70 74 2a 2f 0d 09 0d 09 | 0d 73 74 61 74 69 63 20 |pt*/....|.static |
|00002730| 76 6f 69 64 20 68 61 6e | 64 6c 65 64 72 61 67 20 |void han|dledrag |
|00002740| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 65 76 2c |(EventRe|cord ev,|
|00002750| 20 57 69 6e 64 6f 77 50 | 74 72 20 77 29 20 7b 0d | WindowP|tr w) {.|
|00002760| 09 0d 09 52 65 63 74 20 | 72 3b 0d 0d 09 72 20 3d |...Rect |r;...r =|
|00002770| 20 73 63 72 65 65 6e 42 | 69 74 73 2e 62 6f 75 6e | screenB|its.boun|
|00002780| 64 73 3b 20 0d 20 20 20 | 0d 09 72 2e 74 6f 70 20 |ds; . |..r.top |
|00002790| 3d 20 72 2e 74 6f 70 20 | 2b 20 47 65 74 4d 42 61 |= r.top |+ GetMBa|
|000027a0| 72 48 65 69 67 68 74 20 | 28 29 3b 20 0d 20 20 20 |rHeight |(); . |
|000027b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 0d 09 72 2e | | ..r.|
|000027c0| 6c 65 66 74 20 3d 20 72 | 2e 6c 65 66 74 20 2b 20 |left = r|.left + |
|000027d0| 34 3b 20 20 0d 20 20 20 | 20 20 20 20 20 20 20 20 |4; . | |
|000027e0| 20 20 20 20 0d 09 72 2e | 72 69 67 68 74 20 3d 20 | ..r.|right = |
|000027f0| 72 2e 72 69 67 68 74 20 | 2d 20 34 3b 0d 20 20 20 |r.right |- 4;. |
|00002800| 20 20 20 20 20 20 20 20 | 20 20 20 20 0d 09 72 2e | | ..r.|
|00002810| 62 6f 74 74 6f 6d 20 3d | 20 72 2e 62 6f 74 74 6f |bottom =| r.botto|
|00002820| 6d 20 2d 20 34 3b 0d 20 | 20 20 20 20 20 20 20 20 |m - 4;. | |
|00002830| 20 20 20 20 0d 09 44 72 | 61 67 57 69 6e 64 6f 77 | ..Dr|agWindow|
|00002840| 20 28 77 2c 20 65 76 2e | 77 68 65 72 65 2c 20 26 | (w, ev.|where, &|
|00002850| 72 29 3b 20 20 20 0d 09 | 7d 20 2f 2a 68 61 6e 64 |r); ..|} /*hand|
|00002860| 6c 65 64 72 61 67 2a 2f | 0d 09 0d 09 0d 73 74 61 |ledrag*/|.....sta|
|00002870| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 65 78 69 74 |tic Bool|ean exit|
|00002880| 70 72 6f 67 72 61 6d 20 | 28 76 6f 69 64 29 20 7b |program |(void) {|
|00002890| 0d 09 0d 09 2f 2a 0d 09 | 72 65 74 75 72 6e 73 20 |..../*..|returns |
|000028a0| 74 72 75 65 20 69 66 20 | 74 68 65 20 75 73 65 72 |true if |the user|
|000028b0| 20 63 6c 69 63 6b 73 20 | 69 6e 20 74 68 65 20 67 | clicks |in the g|
|000028c0| 6f 2d 61 77 61 79 20 62 | 6f 78 2e 0d 09 2a 2f 0d |o-away b|ox...*/.|
|000028d0| 09 0d 09 45 76 65 6e 74 | 52 65 63 6f 72 64 20 65 |...Event|Record e|
|000028e0| 76 3b 0d 09 57 69 6e 64 | 6f 77 50 74 72 20 77 3b |v;..Wind|owPtr w;|
|000028f0| 0d 09 0d 09 69 66 20 28 | 21 57 61 69 74 4e 65 78 |....if (|!WaitNex|
|00002900| 74 45 76 65 6e 74 20 28 | 65 76 65 72 79 45 76 65 |tEvent (|everyEve|
|00002910| 6e 74 2c 20 26 65 76 2c | 20 36 30 20 2a 20 73 65 |nt, &ev,| 60 * se|
|00002920| 63 6f 6e 64 73 62 65 74 | 77 65 65 6e 6d 65 73 73 |condsbet|weenmess|
|00002930| 61 67 65 73 2c 20 6e 69 | 6c 29 29 0d 09 09 72 65 |ages, ni|l))...re|
|00002940| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 0d |turn (fa|lse);...|
|00002950| 09 69 66 20 28 65 76 2e | 77 68 61 74 20 21 3d 20 |.if (ev.|what != |
|00002960| 6d 6f 75 73 65 44 6f 77 | 6e 29 0d 09 09 72 65 74 |mouseDow|n)...ret|
|00002970| 75 72 6e 20 28 66 61 6c | 73 65 29 3b 0d 09 09 0d |urn (fal|se);....|
|00002980| 09 73 77 69 74 63 68 20 | 28 46 69 6e 64 57 69 6e |.switch |(FindWin|
|00002990| 64 6f 77 20 28 65 76 2e | 77 68 65 72 65 2c 20 26 |dow (ev.|where, &|
|000029a0| 77 29 29 20 7b 0d 09 0d | 09 09 63 61 73 65 20 69 |w)) {...|..case i|
|000029b0| 6e 47 6f 41 77 61 79 3a | 20 2f 2a 63 6c 69 63 6b |nGoAway:| /*click|
|000029c0| 20 69 6e 20 67 6f 2d 61 | 77 61 79 20 62 6f 78 20 | in go-a|way box |
|000029d0| 74 6f 20 65 78 69 74 20 | 70 72 6f 67 72 61 6d 2a |to exit |program*|
|000029e0| 2f 0d 09 09 09 72 65 74 | 75 72 6e 20 28 54 72 61 |/....ret|urn (Tra|
|000029f0| 63 6b 47 6f 41 77 61 79 | 20 28 77 2c 20 65 76 2e |ckGoAway| (w, ev.|
|00002a00| 77 68 65 72 65 29 29 3b | 0d 09 09 0d 09 09 63 61 |where));|......ca|
|00002a10| 73 65 20 69 6e 53 79 73 | 57 69 6e 64 6f 77 3a 0d |se inSys|Window:.|
|00002a20| 09 09 09 53 79 73 74 65 | 6d 43 6c 69 63 6b 20 28 |...Syste|mClick (|
|00002a30| 26 65 76 2c 20 77 29 3b | 20 0d 09 09 09 0d 09 09 |&ev, w);| .......|
|00002a40| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00002a50| 0d 09 09 0d 09 09 63 61 | 73 65 20 69 6e 44 72 61 |......ca|se inDra|
|00002a60| 67 3a 0d 09 09 09 68 61 | 6e 64 6c 65 64 72 61 67 |g:....ha|ndledrag|
|00002a70| 20 28 65 76 2c 20 77 29 | 3b 0d 09 09 09 0d 09 09 | (ev, w)|;.......|
|00002a80| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00002a90| 0d 09 09 09 0d 09 09 7d | 20 2f 2a 73 77 69 74 63 |.......}| /*switc|
|00002aa0| 68 2a 2f 0d 09 09 0d 09 | 72 65 74 75 72 6e 20 28 |h*/.....|return (|
|00002ab0| 66 61 6c 73 65 29 3b 20 | 2f 2a 64 6f 6e 27 74 20 |false); |/*don't |
|00002ac0| 65 78 69 74 20 74 68 65 | 20 70 72 6f 67 72 61 6d |exit the| program|
|00002ad0| 2a 2f 0d 09 7d 20 2f 2a | 65 78 69 74 70 72 6f 67 |*/..} /*|exitprog|
|00002ae0| 72 61 6d 2a 2f 0d 0d 0d | 76 6f 69 64 20 6d 61 69 |ram*/...|void mai|
|00002af0| 6e 20 28 76 6f 69 64 29 | 20 7b 0d 09 0d 09 73 68 |n (void)| {....sh|
|00002b00| 6f 72 74 20 69 3b 0d 09 | 53 74 72 32 35 35 20 73 |ort i;..|Str255 s|
|00002b10| 63 72 69 70 74 2c 20 72 | 65 73 75 6c 74 2c 20 73 |cript, r|esult, s|
|00002b20| 3b 0d 09 6c 6f 6e 67 20 | 74 69 6d 65 6e 65 78 74 |;..long |timenext|
|00002b30| 6d 65 73 73 61 67 65 3b | 0d 09 6c 6f 6e 67 20 63 |message;|..long c|
|00002b40| 74 20 3d 20 30 3b 20 0d | 09 42 6f 6f 6c 65 61 6e |t = 0; .|.Boolean|
|00002b50| 20 73 68 6f 75 6c 64 62 | 65 66 61 6c 73 65 3b 0d | shouldb|efalse;.|
|00002b60| 09 0d 09 69 6e 69 74 6d | 61 63 69 6e 74 6f 73 68 |...initm|acintosh|
|00002b70| 20 28 29 3b 0d 09 0d 09 | 69 6e 69 74 6d 61 69 6e | ();....|initmain|
|00002b80| 77 69 6e 64 6f 77 20 28 | 29 3b 20 0d 09 0d 09 63 |window (|); ....c|
|00002b90| 6f 70 79 73 74 72 69 6e | 67 20 28 22 5c 70 39 34 |opystrin|g ("\p94|
|00002ba0| 20 2b 20 22 2c 20 73 63 | 72 69 70 74 29 3b 0d 09 | + ", sc|ript);..|
|00002bb0| 0d 09 69 66 20 28 46 72 | 6f 6e 74 69 65 72 44 6f |..if (Fr|ontierDo|
|00002bc0| 53 63 72 69 70 74 20 28 | 73 63 72 69 70 74 2c 20 |Script (|script, |
|00002bd0| 72 65 73 75 6c 74 29 29 | 0d 09 09 63 6f 70 79 73 |result))|...copys|
|00002be0| 74 72 69 6e 67 20 28 22 | 5c 70 46 72 6f 6e 74 69 |tring ("|\pFronti|
|00002bf0| 65 72 44 6f 53 63 72 69 | 70 74 20 73 68 6f 75 6c |erDoScri|pt shoul|
|00002c00| 64 20 68 61 76 65 20 72 | 65 74 75 72 6e 65 64 20 |d have r|eturned |
|00002c10| 66 61 6c 73 65 2e 22 2c | 20 72 65 73 75 6c 74 29 |false.",| result)|
|00002c20| 3b 0d 09 0d 09 73 65 74 | 77 69 6e 64 6f 77 6d 65 |;....set|windowme|
|00002c30| 73 73 61 67 65 20 28 73 | 63 72 69 70 74 2c 20 72 |ssage (s|cript, r|
|00002c40| 65 73 75 6c 74 29 3b 20 | 2f 2a 73 68 6f 75 6c 64 |esult); |/*should|
|00002c50| 20 73 61 79 20 22 43 61 | 6e 27 74 20 63 6f 6d 70 | say "Ca|n't comp|
|00002c60| 69 6c 65 20 74 68 69 73 | 20 73 63 72 69 70 74 2e |ile this| script.|
|00002c70| 2e 2e 22 2a 2f 0d 09 0d | 09 74 69 6d 65 6e 65 78 |.."*/...|.timenex|
|00002c80| 74 6d 65 73 73 61 67 65 | 20 3d 20 54 69 63 6b 43 |tmessage| = TickC|
|00002c90| 6f 75 6e 74 20 28 29 20 | 2b 20 28 36 30 20 2a 20 |ount () |+ (60 * |
|00002ca0| 73 65 63 6f 6e 64 73 62 | 65 74 77 65 65 6e 6d 65 |secondsb|etweenme|
|00002cb0| 73 73 61 67 65 73 29 3b | 0d 0d 09 77 68 69 6c 65 |ssages);|...while|
|00002cc0| 20 28 74 72 75 65 29 20 | 7b 0d 09 09 0d 09 09 69 | (true) |{......i|
|00002cd0| 66 20 28 65 78 69 74 70 | 72 6f 67 72 61 6d 20 28 |f (exitp|rogram (|
|00002ce0| 29 29 20 2f 2a 72 65 74 | 75 72 6e 73 20 74 72 75 |)) /*ret|urns tru|
|00002cf0| 65 20 69 66 20 75 73 65 | 72 20 63 6c 69 63 6b 73 |e if use|r clicks|
|00002d00| 20 69 6e 20 67 6f 20 61 | 77 61 79 20 62 6f 78 2a | in go a|way box*|
|00002d10| 2f 0d 09 09 09 72 65 74 | 75 72 6e 3b 0d 09 09 09 |/....ret|urn;....|
|00002d20| 0d 09 09 69 66 20 28 54 | 69 63 6b 43 6f 75 6e 74 |...if (T|ickCount|
|00002d30| 20 28 29 20 3e 3d 20 74 | 69 6d 65 6e 65 78 74 6d | () >= t|imenextm|
|00002d40| 65 73 73 61 67 65 29 20 | 7b 20 2f 2a 73 65 6e 64 |essage) |{ /*send|
|00002d50| 20 61 20 73 63 72 69 70 | 74 20 65 76 65 72 79 20 | a scrip|t every |
|00002d60| 4e 20 73 65 63 6f 6e 64 | 73 2a 2f 0d 09 09 0d 09 |N second|s*/.....|
|00002d70| 09 09 63 6f 70 79 73 74 | 72 69 6e 67 20 28 22 5c |..copyst|ring ("\|
|00002d80| 70 73 74 61 74 65 73 2e | 6e 74 68 53 74 61 74 65 |pstates.|nthState|
|00002d90| 20 28 28 22 2c 20 73 63 | 72 69 70 74 29 3b 0d 09 | ((", sc|ript);..|
|00002da0| 09 09 0d 09 09 09 70 75 | 73 68 6c 6f 6e 67 20 28 |......pu|shlong (|
|00002db0| 63 74 2b 2b 2c 20 73 63 | 72 69 70 74 29 3b 0d 09 |ct++, sc|ript);..|
|00002dc0| 09 09 0d 09 09 09 70 75 | 73 68 73 74 72 69 6e 67 |......pu|shstring|
|00002dd0| 20 28 22 5c 70 20 25 20 | 35 30 29 20 2b 20 31 29 | ("\p % |50) + 1)|
|00002de0| 22 2c 20 73 63 72 69 70 | 74 29 3b 0d 09 09 09 0d |", scrip|t);.....|
|00002df0| 09 09 09 69 66 20 28 21 | 46 72 6f 6e 74 69 65 72 |...if (!|Frontier|
|00002e00| 44 6f 53 63 72 69 70 74 | 20 28 73 63 72 69 70 74 |DoScript| (script|
|00002e10| 2c 20 72 65 73 75 6c 74 | 29 29 0d 09 09 09 09 53 |, result|)).....S|
|00002e20| 79 73 42 65 65 70 20 28 | 31 29 3b 0d 09 09 09 09 |ysBeep (|1);.....|
|00002e30| 0d 09 09 09 73 65 74 77 | 69 6e 64 6f 77 6d 65 73 |....setw|indowmes|
|00002e40| 73 61 67 65 20 28 73 63 | 72 69 70 74 2c 20 72 65 |sage (sc|ript, re|
|00002e50| 73 75 6c 74 29 3b 0d 09 | 09 09 0d 09 09 09 74 69 |sult);..|......ti|
|00002e60| 6d 65 6e 65 78 74 6d 65 | 73 73 61 67 65 20 3d 20 |menextme|ssage = |
|00002e70| 54 69 63 6b 43 6f 75 6e | 74 20 28 29 20 2b 20 28 |TickCoun|t () + (|
|00002e80| 36 30 20 2a 20 73 65 63 | 6f 6e 64 73 62 65 74 77 |60 * sec|ondsbetw|
|00002e90| 65 65 6e 6d 65 73 73 61 | 67 65 73 29 3b 0d 09 09 |eenmessa|ges);...|
|00002ea0| 09 7d 0d 09 09 7d 20 2f | 2a 77 68 69 6c 65 2a 2f |.}...} /|*while*/|
|00002eb0| 0d 09 7d 20 2f 2a 6d 61 | 69 6e 2a 2f 0d 0d 0d 00 |..} /*ma|in*/....|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 01 00 00 00 01 34 | 00 00 00 34 00 00 00 3e |.......4|...4...>|
|00002f10| 00 3e 72 0e 00 3e 72 30 | 00 3e 72 66 00 3e 72 a4 |.>r..>r0|.>rf.>r.|
|00002f20| 00 3e 72 e2 00 3e 73 04 | 00 3e 73 2a 00 3e 73 50 |.>r..>s.|.>s*.>sP|
|00002f30| 06 6d 61 69 6e 2e 63 b4 | 02 00 00 00 50 61 72 74 |.main.c.|....Part|
|00002f40| 53 49 54 78 00 00 00 00 | 00 00 00 00 00 01 81 b6 |SITx....|........|
|00002f50| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 a9 81 44 bc 00 00 | 00 00 00 00 01 72 76 20 |....D...|.....rv |
|00002f80| 00 3e 76 42 00 3e 76 68 | 00 3e 76 8a 00 3e 76 ac |.>vB.>vh|.>v..>v.|
|00002f90| 00 3e 76 ce 00 3e 76 f4 | 00 3e 77 1a 00 3e 77 40 |.>v..>v.|.>w..>w@|
|00002fa0| 00 3e 77 66 00 3e 77 8c | 00 3e 77 ae 00 3e 77 d4 |.>wf.>w.|.>w..>w.|
|00002fb0| 00 3e 77 fe 00 3e 78 20 | 00 3e 78 4a 00 3e 78 70 |.>w..>x |.>xJ.>xp|
|00002fc0| 00 3e 78 92 00 3e 78 b4 | 00 3e 78 d6 00 3e 78 fc |.>x..>x.|.>x..>x.|
|00002fd0| 00 3e 79 2e 00 3e 79 58 | 00 3e 79 7a 00 3e 79 a0 |.>y..>yX|.>yz.>y.|
|00002fe0| 00 3e 79 c6 00 3e 79 ec | 00 3e 7a 0e 00 3e 7a 38 |.>y..>y.|.>z..>z8|
|00002ff0| 00 3e 7a 62 00 3e 7a 88 | 00 3e 7a ae 00 3e 7a d4 |.>zb.>z.|.>z..>z.|
|00003000| 00 00 00 18 00 01 00 16 | 00 00 2b 31 02 1f 00 28 |........|..+1...(|
|00003010| e5 00 10 40 07 72 65 73 | 75 6c 74 20 00 00 00 14 |...@.res|ult ....|
|00003020| 00 01 00 12 00 00 22 aa | 01 9b 00 f2 02 28 00 00 |......".|.....(..|
|00003030| 03 65 63 20 00 00 01 00 | 00 00 01 34 00 00 00 34 |.ec ....|...4...4|
|00003040| 00 00 00 3e 00 ed cb 18 | 0d 98 00 00 00 1c 00 3e |...>....|.......>|
|00003050| 00 00 44 54 56 55 00 01 | 00 0a 26 23 ff ff 00 00 |..DTVU..|..&#....|
|00003060| 00 00 00 00 00 00 14 f0 | ff ff 00 00 00 1c 00 00 |........|........|
|00003070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+