Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


9.9.5 ResetTrialOpenMode (cancel the trial-open function)

Purpose

Cancels the trial-open function.

Syntax
ResetTrialOpenMode

This command has no arguments.

Description

The ResetTrialOpenMode command cancels the trial-open operation to be performed if a lock error occurs during attempt to open a file that was closed by the TextClose command.

Example
Dim file1, Buff1
file1 = TextOpen( _BIN_ + "Error.log", ReadWrite )
If file1 = 0 Then
  MessageBox( _BIN_ + "Failed to open Error.log", OK )
  Exit 2
End If
TextSeek( file1, ToEnd )
TextWrite( file1, "A lock error occurred." )
SetTrialOpenMode( 2, 6000 )  ' Set trial-open.
TextClose( file1 )  ' Disk write might delay
ResetTrialOpenMode  ' Cancel trial-open.
Exec( "MessageOutput.EXE", True, _BIN_ + "Error.log" )
JP1/Script version

Supported from JP1/Script 10-00.