Klik op het logo voor hulp op afstand
  
 
 
 
 
 
 
 




Scripting Function Reference R


 

Read (Dh,Dlen) : S

JoPPS/JCALL/JScripter

 

Reads a specific number of bytes from a file.

î       Dh is the filehandle,
î       
Dlen is the number of bytes to read.

 

ì       Returns a S-type variable holding the bytes read.

 

M     Use StrSize to determine the number of bytes actually read.

 

ReadLn (Dh) : S

JoPPS/JCALL/JScripter

 

Reads a line of text from a textfile.

î       Dh is the filehandle.

ì       Returns the line read from the textfile.

 

M     Use the EOF function to check if reading past the end of the file.

 

ReadStr (Dh) : S

JoPPS/JCALL/JScripter

 

Reads a part of a textfile into a string, reading starts at the current file pointer position and up to the end of the file.

î       Dh is the filehandle.

ì       Returns a string holding the contents read.

 

&     FileToStr

 

Recode (SstartCode[,bVerbose]) : B

JoPPS - v2.81 P4

 

Recodes assemblies for current project.

î      SstartCode specifies first code of recoding sequence assemblies. If the optional argument bVerbose is TRUE the user has to confirm the action by means of a modal dialog box.

 

ì       Returns TRUE is assemblies recoded, FALSE if not.

RefreshAll([bReset[,bRedraw]])

JoPPS – V3.24

 

Refreshes the JoPPS GUI

î    bReset  reset editorfunctions
î    
bRedraw  redraw the editor

 

RefreshPriceBlocks ( ? ) : ?

JoPPS – V2.82

 

To be documented.

 

 

Regen (Oatom) : B

JoPPS - v2.70

 

Regenerates math atomdata.

î       Oatom is the atom object to regenerate.

 

RemoveDir (Sdir) : B

JoPPS/JCALL/JScripter

 

Removes a subdirectory.

î       Sdir is the name of the subdirectory to remove.

 

ì       Returns TRUE is successful, FALSE if not.

 

M     The subdirectory must be empty or RemoveDir will fail.

 

RenameFile (Sfrom,Sto) : B

JoPPS/JCALL/JScripter

 

Renames a file.

î       Sfrom is the file to rename, Sto is the new name.

 

ì       Returns TRUE if successful, FALSE if not.

 

&     CopyFileTo, CopyFile, MoveFile

 

ReplaceStr( ? ) : ?

JoPPS/JCALL/JScripter – V2.82

 

To be documented.

 

 

ReplaceText (Ssource,SsearchFor,SreplaceBy[,BignoreCase]) : S

JoPPS/JCALL/JScripter

 

Replaces occurrences of one substring with another substring.

î      Replaces occurrences of a substring, specified by SsearchFor, with another substring, specified by SreplaceBy in a given string Ssource.

      If the optional argument Bignore is TRUE the comparison operation is case insensitive.

 

ì       The result of the replace operation.

&     StrReplace

 

ReportHasMacro ([Dslot]) : B

JoPPS

 

Checks if a report slot has an associated macro defined.

î       Dslot is the optional slot index, if not specified the current slot is assumed.

 

ì       Returns TRUE if the specified slot has a macro.

 

M     Its better to specify a slot index as it is possible there is no current slot.

 

ReportHasResult ([Dslot]) : B

JoPPS

 

Checks if a report has a valid result.

î       Dslot is an optional slot index, if not specified the current slot is assumed.

 

ì       Returns TRUE if the slot is up-to-date, FALSE if it is not.

M     Its better to specify a slot index as it is possible there is no current slot.

 

ReportInViewer () : Dslot

JoPPS

 

Returns the slot index of the report currently being viewed.

ì      The slot index of the report slot being viewed in the result viewer, returns -1 if not result report is currently selected in the viewer.

 

&    For an overview of slot index constants refer to the discussion of the TagReport function.

 

ReportRan ([Dslot]) : B

JoPPS

 

ì      Returns if the specified report slot was included in the last report-phase. Likely the report slot generated a valid result.

&    For an overview of slot index constants refer to the discussion of the TagReport function.

 

&     ReportHasResult, UpdateReports

M     Its better to specify a slot index as it is possible there is no current slot.

 

ResetReports( ? ) : ?

JoPPS – V2.82

 

To be documented.

 

 

ResultsValid () : B

JoPPS

 

Returns if whether the results in the result database are up-to-date. (e.g. the "lightening" speedbutton in JoPPS is yellow)
The results are valid since the last calculation and till changes are made to a project or settings invalidating the current results in the result database.

ì       The state of the results in the result database.

 

&     Calculate, SetBatchParams, SetPTableParams

 

ROUND (D) : D

JoPPS/JCALL/JScripter

 

Rounds the argument to the nearest whole number.

î       The numeric Dvalue to be rounded

 

ì       The rounded value.

 

&     TRUNC

 

RP(Sprog[,Sparams][,Bwait]) : Dexitcode

JoPPS/JCALL/JScripter – V2.82

 

This function is an alias for RunProgram.

&     RunProgram

 

RTrim (S) : S

JoPPS/JCALL/JScripter

 

Deletes trailing spaces and control characters from the given string.

î       The String to trim. 

 

ì       The "trimmed" string

 

&     LTrim, Trim

 

 

RunMachine(Dslot[,Dmode][,Sfile]) : D

 

JoPPS - V2.83

 

Start generation format for the selected machine according to the specified mode.

î       The Dslot argument specifies the slot of the machine to be executed (zero based).

î       The optional Dmode argument overrides the current user interface mode. Possible values are:

 

Interface mode constants

Meaning

OWMODE_POPUP

show settings dialog and activate manually

OWMODE_RUN

don’t show dialog and start automatically

 

î       The optional Sfile argument overrides the default name for the output file.

 

ì       The returned value is the status, 0 means completed without errors otherwise the last errorcode is returned.

 

7      Example :

 

IF !ResultsValid() THEN

{

  Calculate();

  RunMachine(0,OWMODE_RUN); //start first machine defined without dialog

};

 

&     SetupMachine

 

RunProgram (Sprog[,Sparams][,Bwait]) : Dexitcode

JoPPS/JCALL/JScripter

 

Runs an external program. (.exe or .com)

î     Sprog is the fully qualified filename of the program to run.
î   Sparams is an optional string representing the commandline parameters passed to the program.

î   Bwait is an optional boolean flag, passing a value of TRUE will cause the script execution to pause till the spawned program terminates.

 

ì     Dexitcode is the exitcode returned by the spawned program (if Bwait is TRUE), -1 indicates a failure finding or starting the program Sprog.

 

RunReport (Dslot[,Drunhow]) : B

JoPPS

 

Runs a JoPPS-Script result report.

î      Dslot specifies the JoPPS-Script report slot.
      If Dslot does not point to a JoPPS-Script type report the function fails.
      The optional Drunhow argument specifies how the script is to be started by the interpreter.

Runhow constants

Meaning

RUN_EDIT

Opens the JoPPS-Script editor, does not execute the script.

RUN_RUN

Starts running the script immediately without opening the JoPPS-Script editor.
The editor pops up when an error is encoutered.

RUN_STEP

Opens the JoPPS-Script editor and position the editor at the first statement.

 

 

ì       Returns TRUE if the report was executed without errors.

&    For an overview of slot index constants refer to the discussion of the TagReport function.

 

&     RunReportMacro


RunReportMacro ([Dslot]) : B

JoPPS

 

Runs a result report macro.

î       Dslot is an optional slot index, if not specified the current slot is assumed


ì       Returns TRUE if the macro executed without errors.

&    For an overview of slot index constants refer to the discussion of the TagReport function.

 

&     RunReport

 

M     Its better to specify a slot index as it is possible there is no current slot.

 

RunScript (Sfn) : SDI

JoPPS

 

Runs an external JoPPS-Script. Sfn specifies the JoPPS-Script source file.

î      Sfn is the filename of the JoPPS-Script source file.
      If no extensions is specified .JSS is assumed. (since v2.06)
      If no path is given the default JSS folder is assumed. (since v2.06)

 

ì       The value returned is the result of the last statement executed in the script

 

M     Make sure the file Sfn exists before passing it as an argument to this function.

 




 |  History  |
 
 

 
 
 
TECHWIN SOFTWARE
De Regenboog 11
B-2800 Mechelen
T +32(0)15 44 64 64
T +31(0)30 899 32 15 Nederland