[Demo] Simple scripting

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demo] Simple scripting

Post by Sergey Tkachenko » Sun Aug 28, 2005 11:21 am

http://www.trichview.com/support/files/script.zip

An example of processing document templates having both text fields
(including mutliline ones) and IF commands.
IF commands allow to exclude some part of text on condition (comparing field value with string constant)

2008-Dec-11: Updated for compatibility with TRichView 11 and Delphi 2009. Now it supports Unicode text (text processing is in ANSI for Delphi 4-2007 and in Unicode for Delphi 2009+)
Last edited by Sergey Tkachenko on Thu Dec 11, 2008 2:53 pm, edited 1 time in total.

Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Sun Sep 11, 2005 6:33 pm

http://www.trichview.com/support/files/script2.zip

Improved.
In this version, field codes inside field values are ignored.
There is also a fix (see the comments in Unit1.pas).

I decided to leave the both versions available, but I recommend to use this one.

Updates:
2008-Dec-11: for compatibility with TRichView 11 and Delphi 2009. Now it supports Unicode text (text processing is in ANSI for Delphi 4-2007 and in Unicode for Delphi 2009+
2011-Oct-11: for compatibility with TRichView 13.4
Last edited by Sergey Tkachenko on Sat Oct 01, 2011 8:42 am, edited 3 times in total.

wvd_vegt
Posts: 84
Joined: Tue Aug 30, 2005 7:39 am

Post by wvd_vegt » Wed Sep 14, 2005 7:01 pm

The link should read

http://www.trichview.com/support/files/script2.zip

Some characters where chopped off.

Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu Sep 15, 2005 4:15 am

thanks, fixed

Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Sat Feb 18, 2006 5:17 pm

http://www.trichview.com/support/files/script2.zip is updated.
Bug fix + processing non-text items.

uniandy
Posts: 13
Joined: Thu Oct 12, 2006 4:27 am

InsertMultilineText to support unicode for multiline text?

Post by uniandy » Fri Dec 01, 2006 1:41 pm

Hi Sergey-

Do you have any updates for:

Not implemented:
...
- supporting Unicode text (some modifications in InsertMultilineText are required for it ...
http://www.trichview.com/support/files/script2.zip


Do you have any solutions on how to change InsertMultilineText to support unicode for multiline text?

Andy

Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Wed Feb 14, 2007 5:03 pm

http://www.trichview.com/support/files/script2.zip
This demo now supports Unicode in editor. But in Delphi 4-2007 it still performs all processing in ANSI string, so conversion Unicode -> ANSI -> Unicode is made. Conversion may lose some characters.

http://www.trichview.com/support/files/scriptw.zip
This is a Unicode version of this demo. All processing is in WideStrings/UnicodeStrings.

Updates
2008-Dec-11: for compatibility with TRichView 11 and Delphi 2009
2011-Oct-1: for compatibility with TRichView 13.4

Post Reply