home *** CD-ROM | disk | FTP | other *** search
- /*
- @BInitialCaps @P@ICopyright Gold Disk Inc., February, 1992.
-
- This Genie will convert the first letter of each word in a block of text to capital letters. The remainder of the block of text will remain unchanged.
- */
- if ~show(l, "gdarexxsupport.library") then
- if ~addlib("gdarexxsupport.library", 0, -30) then
- exit_msg("Please install the gdarexxsupport.library in your libs: directory before using this Genie.")
-
- if word(ppm_GetState(), 1) ~= 3 then
- exit_msg("You must be in edit mode to run this Genie")
-
- text = ppm_GetBlockText(1)
- if text = '' then exit_msg("No block selected")
-
- call ppm_ShowStatus("Working..")
-
- do wrd = 1 to words(text)
-
- fcharpos = skipcodes(text, wordindex(text, wrd))
- if fcharpos = 0 then exit
-
- fchar = substr(text, fcharpos, 1)
- text = overlay(upper(fchar), text, fcharpos, 1)
- end
-
- call ppm_InsertText(text)
- call ppm_ClearStatus()
- exit_msg()
-
- exit_msg: procedure
- do
- parse arg message
-
- if message ~= '' then call ppm_ShowStatus(message)
- exit
- end
-