Appendix: Built-in Scripting Language Returned value Returns the date and or time the file was last modified. Examples GetHstInfo Returns the Start Time, End Time, and Duration of the specified history (*.HST) file. Syntax GetHstInfo( strFileName , numInfoType ) strFileName The file path and name of the history file to be read. numFormat A numeric flag specifying the type of information to be returned: • 0: Returns the Start Time of the file. • 1: Returns the End Time of the file. • 2: Returns the Duration (in hours) of the file. Returned value If the file cannot be read or the specified information cannot be returned, then an error is generated:
Examples GetLine Gets a specified line or search string from a text file and then stores the line in a String tag. Syntax GetLine( strFileName , Search , " tagStore ", optNumCase , " optOveflowTag ", optRunFromServer ) strFileName A string value enclosed in quotes, or the name of a String tag that contains the value, specifying the name of the file to be searched. The name can be a fully qualified file path InduSoft Web Studio Page 529 Tag Name Expression Tag GetFileTime( "C:\Readme.txt" ) Function Group Execution Windows Embedded Thin Client GetHstInfo File Synchronous Supported Supported Supported -1 Failed to retrieve the Start Time; verify the history file exists and is valid.
-2 Failed to retrieve the End Time; verify the history file exists and is valid. -3 Internal program error; please contact Technical Support. -4 The Studio TCP/IP server returned a Time that is incompatible with the format specified in the project screen or Web page. Please use the Verify Project tool to update the project and try again. Tag Name Expression Tag GetHstInfo( "batch", 0 ) Tag GetHstInfo( "hst/02060801.hst", 1 ) Tag GetHstInfo( "C:\batch.bat", 2 ) Function Group Execution Windows Embedded Thin Client GetLine File Synchronous Supported Supported Supported