if pscr = "" | (pscr ~= "WORKBENCH" & ~show('p', pscr)) then
pscr = "SCIONGEN"
wstr = right(notesdir, 1)
if wstr ~= '/' & wstr ~= ':' then notesdir = ""
scrname = scrname||pscr
if panum ~= "" then do
if panum = "QUIET" then do
panum = ""; outval = "QUIET"
lang = 0
end
else if panum = "NOREQ" then do
panum = ""; outval = "NOREQ"
lang = 0
end
else do
pnum = C2D(upper(left(panum,1)))
if pnum >= 65 & pnum <= 90 then do
panum = pnum - 64
lang = CheckAnswer(panum)
end
else if pnum > 47 & pnum < 57 then
lang = CheckAnswer(panum)
else do
lang = 0; panum = ""
end
end
end
else
lang = 0
if outval = "QUIET" then do
outp = 0; usereq = 0; prgrs 0
end
else if outval = "NOREQ" then do
usereq = 0; prgrs = 0
end
if usereq & ~show('l','rexxreqtools.library') then do
if exists('libs:rexxreqtools.library') then
call addlib('rexxreqtools.library',0,-30,0)
else do
usereq = 0; outp = 1
Tell("Unable to open rexxreqtools.library - using text output")
end
end
if ~usereq then prgrs = 0
if prgrs & ~show('l','rexxarplib.library') then do
if exists('libs:rexxarplib.library') then
call addlib('rexxarplib.library',0,-30,0)
else
prgrs = 0
end
screentofront(pscr)
/* Originally stolen from Peter Billing - thanks Peter ;-) */
if ~show('P','SCIONGEN') then do
EndString('I am sorry to say that the SCION Genealogist' || NL ||,
'database is not available. Please start the' || NL ||,
'SCION program BEFORE using this script!')
end
myport = "SCIONGEN"
address value myport
GETDBNAME
dbname = upper(RESULT)
GETPROGVERSION
progvers = RESULT
if outp & ~usereq then do
if pscr ~= "WORKBENCH" then do
scrdev = 'SCNDSCSCR'
if ~open(scrdev, scrname, 'w') then scrdev = stdout
end
Tell("Translate - Scion Language Fields Converter "||versionstr||" by Freddy Ariës")
Tell("Database: "||dbname|| NL)
end
if lang = 0 then do
if ~outp then
EndString("Missing required argument!")
/* even though you will never get to see the message... */
if usereq then do
answ = rtezrequest('Database: '||dbname || NL ||,
'Please select one of the following conversions: ' || NL || NL ||,
' a) Nederlands -> English i) Norsk -> English' || NL ||,
' b) English -> Nederlands j) English -> Norsk' || NL ||,
' c) Deutsch -> English k) Svenska -> English' || NL ||,
' d) English -> Deutsch l) English -> Svenska' || NL ||,
' e) Français -> English m) Suomi -> English' || NL ||,
' f) English -> Français n) English -> Suomi' || NL ||,
' g) Italiano -> English' || NL ||,
' h) English -> Italiano 0) Abort' ||,
NL, '_a|_b|_c|_d|_e|_f|_g|_h|_i|_j|_k|_l|_m|_n|_0','Translate - Scion Language Field Converter '|| versionstr || ' by Freddy Ariës','rtez_flags=ezreqf_noreturnkey rt_pubscrname='||PSCR)
end
else if outp then do
Tell("Please select one of the following conversions: ")
Tell(" a) Nederlands -> English i) Norsk -> English")
Tell(" b) English -> Nederlands j) English -> Norsk")
Tell(" c) Deutsch -> English k) Svenska -> English")
Tell(" d) English -> Deutsch l) English -> Svenska")
Tell(" e) Français -> English m) Suomo -> English")
Tell(" f) English -> Français n) English -> Suomi")