With the StSetOption function, it is possible to set Silk Test-specific options. Most of the options that are necessary for StLoadProject are already set. To change them you have to call StSetOption after the StLoadProject call.
StSetOption( in sOption : string,
             in sValue  : string ): boolean; 
               true if successful
false otherwise
| Parameter | Description | 
|---|---|
| sOption |  The option name you want to set. The following constants can be set: 
                           
                           
  |  
                        
                     
| sValue | The value of the option. | 
The syntax of a Truelog option string is:
OptionString  = "<name pair>{,<name pair>{,<name pair>{...}}}"
Name Pair = <sub-option name>=<option value> 
               | Sub-option Name | Option Value | Description | 
|---|---|---|
| RecordingLevel | Error | Warning | All | Result file recording level for prompts and warnings. | 
| BitMapsOnError | TRUE | FALSE | Record bit maps when errors occur. | 
| BitMaps | TRUE | FALSE | Record bit maps for all selected controls, etc. | 
| DeskTopBitMap | TRUE | FALSE | Record a bitmap of the desktop. | 
| CallStackTrace | TRUE | FALSE | Record call stack. | 
| AgentRecord | TRUE | FALSE | Enable recording of selected controls. | 
| SetText | NONE | BEFORE | AFTER | BOTH | Record the SetText method. | 
| SetMultiText | NONE | BEFORE | AFTER | BOTH | Record the SetMultiText method. | 
| Select | NONE | BEFORE | AFTER | BOTH | Record the Select method. | 
| PickMenu | NONE | BEFORE | AFTER | BOTH | Record the MenuPick method. | 
| TypeKeys | NONE | BEFORE | AFTER | BOTH | Record the TypeKeys method. | 
| MouseClick | NONE | BEFORE | AFTER | BOTH | Record the MouseClick method. | 
| PresRelKeys | NONE | BEFORE | AFTER | BOTH | Record the Press or Release Keys method. | 
| PresRelMouse | NONE | BEFORE | AFTER | BOTH | Record the Press or Release Mouse method. | 
| SetActive | NONE | BEFORE | AFTER | BOTH | Record the SetActive method. | 
| DoubleClick | NONE | BEFORE | AFTER | BOTH | Record the DoubleClíck method. | 
| DoubleSelect | NONE | BEFORE | AFTER | BOTH | Record the DoubleSelect method. | 
| CreateWindow | NONE | BEFORE | AFTER | BOTH | Record the CreateWindow method | 
| CloseWindow | NONE | BEFORE | AFTER | BOTH | Record the CloseWindow method. | 
| LowLevelEnable | TRUE | FALSE | Enable low level action recording. | 
| RecordObjects | TRUE | FALSE | Record Control Objects. | 
| RecordStaticText | TRUE | FALSE | Record Static Text (mostly browsers) | 
| TrackObjects | TRUE | FALSE | Record Object Tracking (add / delete) | 
| BrowserDownLoad | TRUE | FALSE | Record DOM download events. | 
| BrowserNavigate | TRUE | FALSE | Record DOM navigate events. | 
| BrowserTerminate | TRUE | FALSE | Record DOM terminate events. | 
| BrowserNewWindow | TRUE | FALSE | Record DOM new window events. | 
| BrowserRecStat | TRUE | FALSE | Record DOM Rec Stat events. | 
| BrowserJavaScript | TRUE | FALSE | Record Java events | 
| WindowDelay | INT Value | Windows delay for Java | 
"BitMaps=TRUE,AgentRecord=TRUE,SetText=AFTER"
transaction TMain
var
  sUser     : string;
  sPassword : string;
begin
  AttributeGetString("Username", sUser);
  AttributeGetString("Password", sPassword);
  if (StInitSession(sUser, sPassword)) then
    StLoadProject("package.stp");
    StSetOption(ST_OPTION_TRUELOG_OPTIONS, ST_TRUELOG_ALL);
    StSetOption(ST_OPTION_WORKDIR,"<path>");
    StExecuteTestcase("scriptFile.t", "testcase", "\" testdata\",10", "MyTimer1");
    StLogoffSession();
  end;
end TMain;