home *** CD-ROM | disk | FTP | other *** search
Wingz Script | 1990-06-15 | 7.5 KB | 219 lines |
- WNGZWZSC0110
- +on idle call configur.scz:update() end idle
- Cancel@
- kconfigur.scz:bef_aft = ctvalue(6,0) configur.scz:dat_fmt = ctvalue(7,0) configur.scz:neg_num = ctvalue(8,0)
- Decimal separator
- Thousands separator
- Currency symbol
- Currency
- MM-DD-YY
- DD-MM-YY
- YY-MM-DD
- Negative Number
- NOTE: To use the
- symbol in the Custom Number Format,
- you must place it in quotation marks ("") before or after the
- number mask. The $ symbol will produce a $ within the formatted cell.5
- Invalid decimal separator (
- ), thousands separator (5
- ) or currency symbol (5
- ). Try again.5
- Utils\Internat\Startup.scp
- decimal
- decimal separator "
- thousands
- thousands separator "
- before currency
- before currency "
- after currency
- after currency ""
- before currency
- before currency ""
- after currency
- after currency "
- negative
- negative
- use parenthesis
- date input format
- date input format mmddyy
- date 4 format
- date 4 "mm-dd-yy"
- date 5 format
- date 5 "mm-yy"
- datestr1
- MM-DD-YY
- datestr2
- MM-YY
- date input format
- date input format ddmmyy
- date 4 format
- date 4 "dd-mm-yy"
- date 5 format
- date 5 "mm-yy"
- datestr1
- DD-MM-YY
- datestr2
- MM-YY
- date input format
- date input format yymmdd
- date 4 format
- date 4 "yy-mm-dd"
- date 5 format
- date 5 "yy-mm-dd"
- datestr1
- YY-MM-DD
- datestr2
- YY-MM
- Commas
- Commas (
- Startup.scz
- dec_sep
- tho_sep
- cur_sym
- bef_aft
- dat_fmt
- neg_num
- update
- changeit
- DATE: February 10, 1989
- This script displays a dialog box used to change the following
- options in Wingz: currency, symbol, currency symbol placement,
- date input format, negative number notation, decimal separator,
- and thousands separator. A file called Startup is created in
- the same folder that contains Wingz. The Startup file can be
- edited or added to. However, if you re-execute Configur.scz
- any changes or additions are overwritten.
- define dec_sep, tho_sep, cur_sym, bef_aft, dat_fmt, neg_num
- {Dialog Box}
- while 1
- new modal dialog box at (-1, -1) (6700, 4000)
- script "on idle call configur.scz:update() end idle"
- add push button "OK@", "Cancel@" at (3000, 3200) (6700, 4000)
- dialog cancel push button
- select control 1
- dialog default push button
- script "configur.scz:bef_aft = ctvalue(6,0) configur.scz:dat_fmt = ctvalue(7,0) configur.scz:neg_num = ctvalue(8,0)"
- add field at (3700, 0) (6700, 400)
- show control name "Decimal separator "
- field text "."
- maximum field length 1
- add field at (3360, 500) (6700, 900)
- show control name "Thousands separator "
- field text ","
- maximum field length 1
- add field at (2920, 1000) (6700, 1400)
- show control name "Currency symbol "
- field text "$"
- maximum field length 5
- add radio button "", "" at (2960, 1500) (6700, 3000)
- show control title "Currency"
- add radio button "MM-DD-YY", "DD-MM-YY", "YY-MM-DD" at (0, 100) (2200, 2100)
- show control title "Date"
- add radio button "", "" at (0, 2300) (2800, 3800)
- show control title "Negative Number"
- call update()
- bef_aft = 0
- use dialog box
- if cur_sym <> "$"
- message "NOTE: To use the " & cur_sym & " symbol in the Custom Number Format,
- you must place it in quotation marks ("""") before or after the
- number mask. The $ symbol will produce a $ within the formatted cell."
- end if
- if bef_aft
- if (dec_sep = tho_sep) or (dec_sep = cur_sym) or (tho_sep = cur_sym) or
- (dec_sep = ",") or
- (dec_sep = ";") or (tho_sep = ";") or (cur_sym = ";")
- message "Invalid decimal separator (" & dec_sep &
- "), thousands separator (" & tho_sep &
- ") or currency symbol (" & cur_sym & "). Try again."
- else
- call changeit()
- end if
- else
- quit now
- end if
- end while
- {Update the dialog box to reflect the current selections.}
- function update()
- define s
- if dec_sep <> ctstring(3,0) or
- tho_sep <> ctstring(4,0) or
- cur_sym <> ctstring(5,0)
- dec_sep = ctstring(3,0)
- tho_sep = ctstring(4,0)
- cur_sym = ctstring(5,0)
- s = "123" & tho_sep & "456" & dec_sep & "78"
- select control 6
- radio button items cur_sym & s, s & cur_sym
- select control 8
- radio button items "-" & s, "(" & s & ")"
- end if
- end function
- {Opens Startup.scp, the text file, and writes necessary commands to Startup}
- function changeit()
- desktop (20000, 20000) (20001, 20001)
- open script "Utils\Internat\Startup.scp"
- replace field text
- "decimal" with "decimal separator """ & dec_sep & """" options "abcw"
- replace field text
- "thousands" with "thousands separator """ & tho_sep & """" options "abcw"
- if bef_aft = 1
- replace field text
- "before currency" with "before currency """ & cur_sym & """" options "abcw"
- replace field text
- "after currency" with "after currency """"" options "abcw"
- else
- replace field text
- "before currency" with "before currency """"" options "abcw"
- replace field text
- "after currency" with "after currency """ & cur_sym & """" options "abcw"
- end if
- if neg_num = 1
- replace field text
- "negative" with "" options "abcw"
- else
- replace field text
- "negative" with "use parenthesis" options "abcw"
- end if
- {This case statement changes two menu items on the Format Number submenu to
- reflect the selection for date input format.}
- case dat_fmt
- when 1
- replace field text
- "date input format" with "date input format mmddyy" options "abcw"
- replace field text
- "date 4 format" with "date 4 ""mm-dd-yy""" options "abcw"
- replace field text
- "date 5 format" with "date 5 ""mm-yy""" options "abcw"
- replace field text
- "datestr1" with "MM-DD-YY" options "abcw"
- replace field text
- "datestr2" with "MM-YY" options "abcw"
- when 2
- replace field text
- "date input format" with "date input format ddmmyy" options "abcw"
- replace field text
- "date 4 format" with "date 4 ""dd-mm-yy""" options "abcw"
- replace field text
- "date 5 format" with "date 5 ""mm-yy""" options "abcw"
- replace field text
- "datestr1" with "DD-MM-YY" options "abcw"
- replace field text
- "datestr2" with "MM-YY" options "abcw"
- when 3
- replace field text
- "date input format" with "date input format yymmdd" options "abcw"
- replace field text
- "date 4 format" with "date 4 ""yy-mm-dd""" options "abcw"
- replace field text
- "date 5 format" with "date 5 ""yy-mm-dd""" options "abcw"
- replace field text
- "datestr1" with "YY-MM-DD" options "abcw"
- replace field text
- "datestr2" with "YY-MM" options "abcw"
- end case
- replace field text "Commas" with "Commas (" & tho_sep & ")" options "abcw"
- save as "Startup.scz"
- quit now
- end function
-