Monday, May 9, 2016

SilkPerformer: Determine if a script is running in the "Try Script" mode

Sometimes it's useful to know if a script is running in the "Try Script" mode. This is particularly true if the scripts are timing sensitive since Silk Performer does not honor ThinkTime when running in the "Try Script" mode. Hence, ThinkTime may have to be replaced with Wait instead when running in the "Try Script" mode.
  1.   function ESGTryScriptMode  
  2.   : boolean  
  3.   var  
  4.     sDirName   : string;  
  5.   begin  
  6.     GetDirectory(DIRECTORY_RESULT, sDirName, STRING_COMPLETE);  
  7.     ESGTryScriptMode := (Strstr(sDirName, "TryScript") <> "");  
  8.   end ESGTryScriptMode;  

No comments:

Post a Comment