home *** CD-ROM | disk | FTP | other *** search
- /*
- @BEnterPersonalInfo @P@ICopyright Gold Disk Inc., February, 1992
- This Genie stores personal data for automatic retrieval and insertion.
- (See also InsertPersonalInfo).
- */
- address command
- /*
- call SafeEndEdit.rexx()
- */
-
- cr = '0a'x
- startclip = "/*****Start Clips*****/"
- endclip = "/*****End Clips*****/"
- startprefs = "/*****Start Prefs*****/"
- endprefs = "/*****End Prefs*****/"
- startsave = "/*****StartSave*****/"
- endsave = "/*****EndSave*******/"
- startupfile = "s:ppage.config"
- styletagdef = "s:styletags.dflt"
- paratagdef = "s:paratags.dflt"
- startup = ''
- clist = 0
-
- counter = 1
- num = 0
-
-
- /*
- * If there is no ppage.config file, then ask for info and create
- */
- if ~exists(startupfile) then
- do
- startup = "/*"cr || '09'x || "Professional Page Configuration File"cr"*/"
-
- form = "Name"cr"Company Name"cr"Address"cr"City"cr"State/Province"cr"Country"cr"Zip/Postal Code"cr"Phone"cr"Fax"
-
- form = ppm_GetForm("Information Form", 35, form)
- if form = '' then exit_msg()
-
- parse var form name '0a'x comp '0a'x add '0a'x city '0a'x state '0a'x country '0a'x zc '0a'x phone '0a'x fax
-
- prefix = "call setclip(ppuser_"
-
- clips.1 = startclip
- clips.2 = prefix || 'name,"'name'")'
- clips.3 = prefix || 'company,"'comp'")'
- clips.4 = prefix || 'address,"'add'")'
- clips.5 = prefix || 'phone,"'phone'")'
- clips.6 = prefix || 'fax,"'fax'")'
- clips.7 = prefix || 'zipcode,"'zc'")'
- clips.8 = prefix || 'city,"'city'")'
- clips.9 = prefix || 'state,"'state'")'
- clips.10 = prefix || 'country,"'country'")'
- clips.11= endclip
- clist = 11
-
- call setclip(ppuser_name,name)
- call setclip(ppuser_company,comp)
- call setclip(ppuser_address,add)
- call setclip(ppuser_phone,phone)
- call setclip(ppuser_zipcode,zc)
- call setclip(ppuser_city,city)
- call setclip(ppuser_state,state)
- call setclip(ppuser_country,country)
- call setclip(ppuser_fax,fax)
-
- end
- else
- do
- /*
- * PPage.Config file already exists
- */
- if ~open(file, startupfile, "r") then
- call exit_msg("DOS error. Unable to create a configuration file.")
-
- do while ~eof(file)
-
- text = strip(readln(file))
- if text = '' then iterate
-
- if text = startclip then
- /*
- * Read personal info from ppage.config
- */
- do while ~ eof(file)
-
- text = readln(file)
- if text = endclip then leave
-
- end
- else
- startup = startup || cr || text
-
- end
-
- call close(file)
-
- name = getclip(ppuser_name)
- comp = getclip(ppuser_company)
- add = getclip(ppuser_address)
- phone = getclip(ppuser_phone)
- fax = getclip(ppuser_fax)
- zc = getclip(ppuser_zipcode)
- city = getclip(ppuser_city)
- state = getclip(ppuser_state)
- country = getclip(ppuser_country)
-
- form = "Name:"name || cr"Company Name:"comp || cr"Address:"add || cr"City:"city || cr"State/Province:"state || cr"Country:"country || cr"Zip/Postal Code:"zc || cr"Phone:"phone || cr"Fax:"fax
-
- form = ppm_GetForm("Information Form", 35, form)
- if form = '' then exit_msg()
-
- parse var form name '0a'x comp '0a'x add '0a'x city '0a'x state '0a'x country '0a'x zc '0a'x phone '0a'x fax
-
- prefix = "call setclip(ppuser_"
-
- clips.1 = startclip
- clips.2 = prefix || 'name,"'name'")'
- clips.3 = prefix || 'company,"'comp'")'
- clips.4 = prefix || 'address,"'add'")'
- clips.5 = prefix || 'phone,"'phone'")'
- clips.6 = prefix || 'fax,"'fax'")'
- clips.7 = prefix || 'zipcode,"'zc'")'
- clips.8 = prefix || 'city,"'city'")'
- clips.9 = prefix || 'state,"'state'")'
- clips.10 = prefix || 'country,"'country'")'
- clips.11= endclip
- clist = 11
- call setclip(ppuser_name,name)
- call setclip(ppuser_company,comp)
- call setclip(ppuser_address,add)
- call setclip(ppuser_phone,phone)
- call setclip(ppuser_fax,fax)
- call setclip(ppuser_zipcode,zc)
- call setclip(ppuser_city,city)
- call setclip(ppuser_state,state)
- call setclip(ppuser_country,country)
- end
-
-
- /*
- * Write out info to file
- */
- if exists(startupfile) then
- do
- address command
- 'copy' startupfile startupfile".bak"
- 'delete' startupfile 'quiet'
- address
- end
-
- if ~open(file, startupfile, "w") then exit_msg("Unable to open config file")
- call writeln(file, startup)
-
- do i = 1 to clist
- call writeln(file, clips.i)
- end
-
- call close(file)
- call ppm_ShowStatus("Done")
- exit_msg()
-
- separate:
- do
- arg settings
-
- inpar = ''
-
- do i = 1 to (words(settings) - 1)
-
- set = word(settings, 1)
- inpar = inpar||set","
- settings = subword(settings,2)
-
- end
-
- inpar = inpar||settings
-
- return(inpar)
-
- end
-
-
- exit_msg:
- do
-
- parse arg message
-
- if message ~= '' then
- call ppm_Inform(1, message,)
-
- call ppm_ClearStatus()
- exit
-
- end
-
-