home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / b / b430 / 1.ddi / UTILS / INTERNAT / CONFIGUR.SCZ (.txt) next >
Encoding:
Wingz Script  |  1990-06-15  |  7.5 KB  |  219 lines

  1. WNGZWZSC0110
  2. +on idle call configur.scz:update() end idle
  3. Cancel@
  4. kconfigur.scz:bef_aft = ctvalue(6,0) configur.scz:dat_fmt = ctvalue(7,0) configur.scz:neg_num = ctvalue(8,0)
  5. Decimal separator 
  6. Thousands separator 
  7. Currency symbol 
  8. Currency
  9. MM-DD-YY
  10. DD-MM-YY
  11. YY-MM-DD
  12. Negative Number
  13. NOTE:  To use the 
  14.  symbol in the Custom Number Format,
  15.  you must place it in quotation marks ("") before or after the
  16.  number mask.  The $ symbol will produce a $ within the formatted cell.5
  17. Invalid decimal separator (
  18. ), thousands separator (5
  19. ) or currency symbol (5
  20. ).  Try again.5
  21. Utils\Internat\Startup.scp
  22. decimal
  23. decimal separator "
  24.     thousands
  25. thousands separator "
  26. before currency
  27. before currency "
  28. after currency
  29. after currency ""
  30. before currency
  31. before currency ""
  32. after currency
  33. after currency "
  34. negative
  35. negative
  36. use parenthesis
  37. date input format
  38. date input format mmddyy
  39. date 4 format
  40. date 4 "mm-dd-yy"
  41. date 5 format
  42. date 5 "mm-yy"
  43. datestr1
  44. MM-DD-YY
  45. datestr2
  46. MM-YY
  47. date input format
  48. date input format ddmmyy
  49. date 4 format
  50. date 4 "dd-mm-yy"
  51. date 5 format
  52. date 5 "mm-yy"
  53. datestr1
  54. DD-MM-YY
  55. datestr2
  56. MM-YY
  57. date input format
  58. date input format yymmdd
  59. date 4 format
  60. date 4 "yy-mm-dd"
  61. date 5 format
  62. date 5 "yy-mm-dd"
  63. datestr1
  64. YY-MM-DD
  65. datestr2
  66. YY-MM
  67. Commas
  68. Commas (
  69. Startup.scz
  70. dec_sep
  71. tho_sep
  72. cur_sym
  73. bef_aft
  74. dat_fmt
  75. neg_num
  76. update
  77. changeit
  78. DATE:  February 10, 1989
  79.     This script displays a dialog box used to change the following
  80.     options in Wingz:  currency, symbol, currency symbol placement,
  81.     date input format, negative number notation, decimal separator,
  82.     and thousands separator.    A file called Startup is created in
  83.     the same folder that contains Wingz.  The Startup file can be
  84.     edited or added to.  However, if you re-execute Configur.scz
  85.     any changes or additions are overwritten.
  86. define dec_sep, tho_sep, cur_sym, bef_aft, dat_fmt, neg_num
  87. {Dialog Box}
  88. while 1
  89.     new modal dialog box at (-1, -1) (6700, 4000)
  90.     script "on idle call configur.scz:update() end idle"
  91.     add push button "OK@", "Cancel@" at (3000, 3200) (6700, 4000)
  92.     dialog cancel push button
  93.     select control 1
  94.     dialog default push button
  95.     script "configur.scz:bef_aft = ctvalue(6,0) configur.scz:dat_fmt = ctvalue(7,0) configur.scz:neg_num = ctvalue(8,0)"
  96.     add field at (3700, 0) (6700, 400)
  97.     show control name "Decimal separator "
  98.     field text "."
  99.     maximum field length 1
  100.     add field at (3360, 500) (6700, 900)
  101.     show control name "Thousands separator "
  102.     field text ","
  103.     maximum field length 1
  104.     add field at (2920, 1000) (6700, 1400)
  105.     show control name "Currency symbol "
  106.     field text "$"
  107.     maximum field length 5
  108.     add radio button "", "" at (2960, 1500) (6700, 3000)
  109.     show control title "Currency"
  110.     add radio button "MM-DD-YY", "DD-MM-YY", "YY-MM-DD" at (0, 100) (2200, 2100)
  111.     show control title "Date"
  112.     add radio button "", "" at (0, 2300) (2800, 3800)
  113.     show control title "Negative Number"
  114.     call update()
  115.     bef_aft = 0
  116.     use dialog box
  117.     if cur_sym <> "$"
  118.  message "NOTE:  To use the " & cur_sym & " symbol in the Custom Number Format,
  119.  you must place it in quotation marks ("""") before or after the
  120.  number mask.  The $ symbol will produce a $ within the formatted cell."
  121.     end if 
  122.     if bef_aft
  123.         if (dec_sep = tho_sep) or (dec_sep = cur_sym) or (tho_sep = cur_sym) or
  124.             (dec_sep = ",") or
  125.             (dec_sep = ";") or (tho_sep = ";") or (cur_sym = ";")
  126.             message "Invalid decimal separator (" & dec_sep &
  127.                     "), thousands separator (" & tho_sep &
  128.                     ") or currency symbol (" & cur_sym & ").  Try again."
  129.         else
  130.             call changeit()
  131.         end if
  132.     else
  133.         quit now
  134.     end if
  135. end while
  136. {Update the dialog box to reflect the current selections.}
  137. function update()
  138. define s
  139.     if dec_sep <> ctstring(3,0) or
  140.         tho_sep <> ctstring(4,0) or
  141.         cur_sym <> ctstring(5,0)
  142.         dec_sep = ctstring(3,0)    
  143.         tho_sep = ctstring(4,0)    
  144.         cur_sym = ctstring(5,0)
  145.         s = "123" & tho_sep & "456" & dec_sep & "78" 
  146.         select control 6
  147.         radio button items cur_sym & s, s & cur_sym
  148.         select control 8
  149.         radio button items "-" & s, "(" & s & ")"
  150.     end if
  151. end function
  152. {Opens Startup.scp, the text file, and writes necessary commands to Startup}
  153. function changeit()
  154. desktop (20000, 20000) (20001, 20001)
  155.     open script "Utils\Internat\Startup.scp"
  156.     replace field text 
  157.         "decimal" with "decimal separator """ & dec_sep & """" options "abcw"
  158.     replace field text
  159.         "thousands" with "thousands separator """ & tho_sep & """" options "abcw"
  160.     if bef_aft = 1
  161.         replace field text
  162.             "before currency" with "before currency """ & cur_sym & """" options "abcw"
  163.         replace field text
  164.             "after currency" with "after currency """"" options "abcw"
  165.     else
  166.         replace field text
  167.             "before currency" with "before currency """"" options "abcw"
  168.         replace field text
  169.             "after currency" with "after currency """ & cur_sym & """" options "abcw"
  170.     end if
  171.     if neg_num = 1
  172.         replace field text
  173.             "negative" with "" options "abcw"
  174.     else
  175.         replace field text
  176.             "negative" with "use parenthesis" options "abcw"
  177.     end if
  178. {This case statement changes two menu items on the Format Number submenu to
  179.     reflect the selection for date input format.}
  180.     case dat_fmt
  181.         when 1
  182.             replace field text
  183.                 "date input format" with "date input format mmddyy" options "abcw"
  184.             replace field text
  185.                 "date 4 format" with "date 4 ""mm-dd-yy""" options "abcw"
  186.             replace field text
  187.                 "date 5 format" with "date 5 ""mm-yy""" options "abcw"
  188.             replace field text
  189.                 "datestr1" with "MM-DD-YY" options "abcw"
  190.             replace field text
  191.                 "datestr2" with "MM-YY" options "abcw"
  192.         when 2
  193.             replace field text
  194.                 "date input format" with "date input format ddmmyy" options "abcw"
  195.             replace field text
  196.                 "date 4 format" with "date 4 ""dd-mm-yy""" options "abcw"
  197.             replace field text
  198.                 "date 5 format" with "date 5 ""mm-yy""" options "abcw"
  199.             replace field text
  200.                 "datestr1" with "DD-MM-YY" options "abcw"
  201.             replace field text
  202.                 "datestr2" with "MM-YY" options "abcw"
  203.         when 3
  204.             replace field text
  205.                 "date input format" with "date input format yymmdd" options "abcw"
  206.             replace field text
  207.                 "date 4 format" with "date 4 ""yy-mm-dd""" options "abcw"
  208.             replace field text
  209.                 "date 5 format" with "date 5 ""yy-mm-dd""" options "abcw"
  210.             replace field text
  211.                 "datestr1" with "YY-MM-DD" options "abcw"
  212.             replace field text
  213.                 "datestr2" with "YY-MM" options "abcw"
  214.     end case
  215.     replace field text "Commas" with "Commas (" & tho_sep & ")" options "abcw"
  216.     save as "Startup.scz"
  217.     quit now
  218. end function
  219.