TPlannerScript : Making TPlanner scriptable

By using PlannerScript, the component descendant of TatPascalScripter (requires TatPascalScripter to be installed), applications using TPlanner can have a high degree of configurability, flexibility and automation control. The TPlannerScript makes all TPlanner properties available as well as adding the most common TPlanner methods. With TPlannerScript it is easy to automate creation of multiple events at regular intervals, implement global find & replace functions, implement global planner items property changes etc.. The possibilities are only limited by your imagination.

Setting up TPlannerScript

- Install the TatPascalScripter, TPlanner and TPlannerScript components
- Drop a TPlanner or TDBPlanner on the form with a TPlannerScript. Assign the TPlanner to the PlannerScript's Planner property
- Use the SourceCode property of TPlannerScript to set the code to be executed by the script.
- Execute the script by calling its execute method.


The demo application shows 3 scripts:
1. This script creates 10 planner items & highlights the second item
2. This script performs a find and changes the properties of items that meet the criteria
3. This script extends all planner items max. 5x 30 minutes, except if the item would overlap

Download TPlannerScript
Download TPlannerScript demo application



Following methods of TPlanner are available through TPlannerScript in addition to all properties :

CreateItem
CreateItemAtSelection
FreeItem
UpdateItem
SetItemText
GetItemText
SelectItem
GetItem
GetItemCount
ScrollItemInView
FlashItem
ClearItems
SaveToFile
SaveToHTML
LoadFromFile
'InsertFromFile
SaveLayerToFile
SavePositionToFile
LoadLayerFromFile
LoadPositionFromFile
Print
PrintSelection
PrintRange
MovePostion
DeletePostion
InsertPostion
HasItem
FindFirst
FindNext
FindText
BeginUpdate
EndUpdate