home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / zcalc.sit / Z-CALC / card_3804.txt < prev    next >
Text File  |  1988-03-27  |  9KB  |  349 lines

  1. -- card: 3804 from stack: in
  2. -- bmap block id: 3968
  3. -- flags: 0000
  4. -- background id: 2761
  5. -- name: 
  6.  
  7.  
  8. -- part 3 (field)
  9. -- low flags: 01
  10. -- high flags: 4004
  11. -- rect: left=55 top=184 right=210 bottom=164
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: StopF
  20.  
  21.  
  22. -- part 4 (field)
  23. -- low flags: 01
  24. -- high flags: 4004
  25. -- rect: left=56 top=224 right=250 bottom=165
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 3
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: StepF
  34.  
  35.  
  36. -- part 6 (field)
  37. -- low flags: 01
  38. -- high flags: 4004
  39. -- rect: left=54 top=141 right=167 bottom=163
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 0
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 0
  46. -- line height: 16
  47. -- part name: StartF
  48.  
  49.  
  50. -- part 7 (field)
  51. -- low flags: 00
  52. -- high flags: 4004
  53. -- rect: left=188 top=141 right=167 bottom=254
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 0
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: FinStart
  62.  
  63.  
  64. -- part 8 (field)
  65. -- low flags: 00
  66. -- high flags: 4004
  67. -- rect: left=188 top=183 right=209 bottom=254
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 0
  71. -- font id: 3
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: FinStop
  76.  
  77.  
  78. -- part 11 (field)
  79. -- low flags: 00
  80. -- high flags: 4004
  81. -- rect: left=189 top=224 right=250 bottom=255
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 0 / 0
  84. -- text alignment: 0
  85. -- font id: 3
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: FinStep
  90.  
  91.  
  92. -- part 13 (field)
  93. -- low flags: 01
  94. -- high flags: 4004
  95. -- rect: left=291 top=140 right=166 bottom=400
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 0
  99. -- font id: 3
  100. -- text size: 12
  101. -- style flags: 0
  102. -- line height: 16
  103. -- part name: Len
  104.  
  105.  
  106. -- part 14 (field)
  107. -- low flags: 00
  108. -- high flags: 4004
  109. -- rect: left=413 top=141 right=167 bottom=479
  110. -- title width / last selected line: 0
  111. -- icon id / first selected line: 0 / 0
  112. -- text alignment: 0
  113. -- font id: 3
  114. -- text size: 12
  115. -- style flags: 0
  116. -- line height: 16
  117. -- part name: LenIn
  118.  
  119.  
  120. -- part 19 (field)
  121. -- low flags: 00
  122. -- high flags: 4004
  123. -- rect: left=413 top=184 right=210 bottom=479
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 0
  127. -- font id: 3
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: DiaIn
  132.  
  133.  
  134. -- part 20 (field)
  135. -- low flags: 01
  136. -- high flags: 4004
  137. -- rect: left=291 top=183 right=209 bottom=400
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 0
  141. -- font id: 3
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: Dia
  146.  
  147.  
  148. -- part 21 (field)
  149. -- low flags: 01
  150. -- high flags: 4004
  151. -- rect: left=291 top=226 right=252 bottom=400
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 0
  155. -- font id: 3
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: Dia
  160.  
  161.  
  162. -- part 22 (field)
  163. -- low flags: 00
  164. -- high flags: 4004
  165. -- rect: left=291 top=225 right=251 bottom=400
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 0
  169. -- font id: 3
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: Xform
  174.  
  175.  
  176. -- part 23 (field)
  177. -- low flags: 00
  178. -- high flags: 4004
  179. -- rect: left=412 top=226 right=252 bottom=478
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 0
  183. -- font id: 3
  184. -- text size: 12
  185. -- style flags: 0
  186. -- line height: 16
  187. -- part name: XforIn
  188.  
  189.  
  190. -- part 24 (button)
  191. -- low flags: 00
  192. -- high flags: A003
  193. -- rect: left=82 top=259 right=280 bottom=188
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 1
  197. -- font id: 0
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: Print Results
  202. ----- HyperTalk script -----
  203. on mouseUp
  204.   put line 2 of card field "FREQ1" of card id  5160 into PRINT1
  205.   put line 2 of card field "FREQ2" of card id  5981 into PRINT2
  206.   put line 2 of card field "FREQ3" of card id  6565 into PRINT3
  207.   if PRINT1 <> "  " then print card id 5160
  208.   if PRINT2 <> "  " then print card id 5981
  209.   if PRINT3 <> "  " then print card id 6565
  210. end mouseUp
  211.  
  212.  
  213.  
  214. -- part 26 (button)
  215. -- low flags: 00
  216. -- high flags: A003
  217. -- rect: left=300 top=278 right=300 bottom=400
  218. -- title width / last selected line: 0
  219. -- icon id / first selected line: 0 / 0
  220. -- text alignment: 1
  221. -- font id: 0
  222. -- text size: 12
  223. -- style flags: 0
  224. -- line height: 16
  225. -- part name: Calculate
  226. ----- HyperTalk script -----
  227. on mouseUp
  228.   set numberFormat to 0.00
  229.   put " Calculation in Process" into the message box
  230.   put line 1 of card field "FinStart" of card id 3804 into f1
  231.   put line 1 of card field "FinStop" of card id 3804 into f2
  232.   put line 1 of card field "FinStep" of card id 3804 into f3
  233.   put (f2-f1)/f3 into nf
  234.   put nf+1 into nf
  235.   put line 1 of card field "LenIn" of card id 3804 into L
  236.   put L/39.37 into L
  237.   put line 1 of card field "DiaIn" of card id 3804 into D
  238.   put D/39.37 into D
  239.   put D/2 into a
  240.   put line 1 of card field "XforIn" of card id 3804 into T
  241.   repeat with i =1 to 50
  242.     if i > nf then exit repeat
  243.     if i > 27 then put "Too many frequencies" into msg
  244.     if i > 27 then beep 1
  245.     if i > 27 then wait 8 seconds
  246.     if i > 27 then exit repeat
  247.     put f1+(i-1)*f3 into F
  248.     put 300/F into WL
  249.     put wl/4 into QWL
  250.     if L > QWL then put "Lenght > halfwavelength--calculation terminated"
  251.     if L > QWL then beep 1
  252.     if L > QWL then wait 8 seconds
  253.     if L > QWL then exit repeat
  254.     put 6.28319*L/WL into KL
  255.     put 0.0517-2.0045*KL+29.0195*(KL)^2-13.2279*(KL)^3+9.16*(KL)^4 into R
  256.     put -0.0567+10.1642*KL+12.3257*(KL)^2-11.5684*(KL)^3+6.7264*(KL)^4 into X
  257.     if i <= 9 then put F into line i+1 of card field "FREQ1" of card id 5160
  258.     if i > 9 and i <= 18 then put F into line i-8 of card field "FREQ2" of card id 5981
  259.     if i > 18 and i<= 27 then put F into line i-17 of card field "FREQ3" of card id 6565
  260.     if i <= 9 then put R into line i+1 of card field "RIN1" of card id 5160
  261.     if i > 9 and i <= 18 then put R into line i-8 of card field "RIN2" of card id 5981
  262.     if i > 18 and i<= 27 then put R into line i-17 of card field "RIN3" of card id 6565
  263.     put 2*L/a into ARG
  264.     put ln(ARG) into LARG
  265.     put 120*(LARG-1) into xxx
  266.     put 1/(tan(KL)) into CTKL
  267.     put -(xxx*CTKL-X) into Xin
  268.     if i <= 9 then put Xin into line i+1 of card field "XIN1" of card id 5160
  269.     if i > 9 and i <= 18 then put Xin into line i-8 of card field "XIN2" of card id 5981
  270.     if i > 18 and i<= 27 then put Xin into line i-17 of card field "XIN3" of card id 6565
  271.     put R/50 into RR
  272.     put Xin/50 into XXin
  273.     put (sqrt((RR-1)^2+XXin^2)/sqrt((RR+1)+XXin^2)) into RHO
  274.     put 1-RHO^2 into S
  275.     put 4.343*ln(S) into SS
  276.     if i <= 9 then put SS into line i+1 of card field "Loss1" of card id 5160
  277.     if i > 9 and i <= 18 then put SS into line i-8 of card field "Loss2" of card id 5981
  278.     if i > 18 and i<= 27 then put SS into line i-17 of card field "Loss3" of card id 6565
  279.   end repeat
  280.   hide message box
  281. end mouseUp
  282.  
  283.  
  284.  
  285. -- part 28 (button)
  286. -- low flags: 00
  287. -- high flags: A003
  288. -- rect: left=82 top=290 right=310 bottom=189
  289. -- title width / last selected line: 0
  290. -- icon id / first selected line: 0 / 0
  291. -- text alignment: 1
  292. -- font id: 0
  293. -- text size: 12
  294. -- style flags: 0
  295. -- line height: 16
  296. -- part name: Plot M-M Loss
  297. ----- HyperTalk script -----
  298. on mouseUp
  299.   open Cricket Graph
  300. end mouseUp
  301.  
  302.  
  303.  
  304. -- part 30 (button)
  305. -- low flags: 00
  306. -- high flags: 0000
  307. -- rect: left=209 top=285 right=342 bottom=304
  308. -- title width / last selected line: 0
  309. -- icon id / first selected line: 11045 / 11045
  310. -- text alignment: 1
  311. -- font id: 0
  312. -- text size: 12
  313. -- style flags: 0
  314. -- line height: 16
  315. -- part name: home
  316. ----- HyperTalk script -----
  317. on mouseUp
  318.   go to HOME
  319. end mouseUp
  320.  
  321.  
  322.  
  323. -- part contents for card part 6
  324. ----- text -----
  325. Start Freq (MHz)
  326.  
  327. -- part contents for card part 3
  328. ----- text -----
  329. Stop Freq (Mhz)
  330.  
  331. -- part contents for card part 4
  332. ----- text -----
  333. Freq Step (MHz)
  334.  
  335. -- part contents for card part 13
  336. ----- text -----
  337. Half-Length
  338.  
  339. -- part contents for card part 20
  340. ----- text -----
  341. Diameter
  342.  
  343. -- part contents for card part 22
  344. ----- text -----
  345. Xformer Ratio
  346.  
  347. -- part contents for card part 23
  348. ----- text -----
  349. 1.0