Page 1 of 3
Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 1:14 am
by kcarmody
I have made one more enhancement to the WordScribe and WordWriter HFCL applications that I submitted three weeks ago. For this one, I added some hot key commands to INCLUDE\i_keybd.ch, and then I used two of them in WordScribe and WordWriter.
You can download the updated proposal from my site as follows. It should be installed on top of 3.4.3.
Hope you enjoy!
Kevin
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 1:22 am
by Rathinagiri
Thank you Kevin.
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 1:25 am
by Rathinagiri
Kevin,
I wanted to create rtf files from inside the program. Is it possible? If it is, we can create report files in rtf.
Especially we have to create tables.
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 2:58 am
by Steed
GRACIAS
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 7:02 am
by serge_girard
I wanted to create rtf files from inside the program
This would be great !
Serge
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 11:49 am
by kcarmody
Rathinagiri wrote:I wanted to create rtf files from inside the program. Is it possible? If it is, we can create report files in rtf.
Especially we have to create tables.
WordScribe and WordWriter are word processors and can write to RTF files as well as several formats of TXT files. They do this through the EX...SAVEFILE method of a rich edit control, which sends a Windows message to write the rich edit control to the file. This message can only be used on rich edit controls.
If you had a text buffer and wanted to write it to RTF, you could define an invisible rich edit box, write the buffer to a temporary text file, use the EX...LOADFILE method to read the temp file, then use EX...SAVEFILE to write it to an RTF file. But you would not have any formatting other than tabs and line breaks, so I don't see what the advantage of this would be. Tabs would be the only way to format table data, since rich edit controls cannot create tabs but not tables. Tabs are not a very good way to format table data.
An RTF file is just a series of text based commands, however, so it is not very hard for you to write functions that output RTF commands into an RTF file. I did this once to generate an RTF table in one of my applications, Akshara Bridge (
http://kevincarmody.com/software/aksharabridge.html). This program transliterates between various Indian scripts, and when it encounters errors in the input, it can generate an error file. If you select an error file name ending in .rtf, it generates an RTF table for each error. You can download the source and look at ErrorChar() in AksharaBridgeBack.prg. I've attached a zip file containing a sample RTF file generated by this function.
Hope this helps.
Kevin
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 11:55 am
by Rathinagiri
Wonderful. Thank you Kevin.
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 12:12 pm
by kcarmody
Another alternative is to write HTML tables. HTML syntax is much easier than RTF, and more flexible too. For example, table columns in RTF are fixed width, but variable width in HTML.
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Mon Jun 20, 2016 1:52 pm
by Rathinagiri
That is right. I have already made that and shared here.
viewtopic.php?f=9&t=4603
Re: Another enhancement to HFCL WordScribe and WordWriter
Posted: Wed Jun 22, 2016 3:43 pm
by kcarmody
I've just updated one of the hot key demos to reflect the new hot key commands in INCLUDE\i_keybd.ch.
Kevin