About the JavaFoil Scripting Edition

Purpose Scripting makes it possible to repeat design and analysis tasks in JavaFoil accurately. This is very helpful when you want to analyze a series of airfoils or try to repeat a complicated modification like positioning the elements of a multi-element airfoil.

Starting in version 2.20, JavaFoil's own script language has been replaced by JavaScript. Older scripts can be re-used but may require some minor modifications. The usage of JavaScript offers many new capabilities and improves the scripting capability greatly. However, this feature requires Java 6 or later.

The script window contains command buttons to save and load script files as well as a recorder. To run a script all you have to do is to press the "Run" button or for debugging purposes "Step" through the script. Especially for the beginner it is recommended to use the "Record" feature and to modify the resulting scripts.

Syntax Command names are composed of a two part command, followed by arguments enclosed in parenthesis:

CardName . CommandName ( Argument1 ; Argument2 ; ... )

All commands start with the name of the card which hosts the command. The name of the command is separated from the name of the card by a dot.

Arguments must be separated by the "path separator" character, which is a ';' by default. It is not possible to use this system dependent character for other purposes.

Remarks You can insert blank characters between all parts of a script command to improve readability.

Strings should be enclosed in double quotes, at least if they contain white space characters.

Floating point numbers must use the dot '.' decimal character according to US country settings. It is recommended to add a "Options.Country(0)" command at the start of each script to make sure that the correct country settings are active.

It is possible and recommended to use the recording facility in the script window to prepare a new script. After stopping the recorder this script can be extended and modified.

You can use the Script=ScriptFileName command line option to load and execute a script on startup of JavaFoil.

 

A typical command line would then look like:

java.exe -DScript=MyScript.jfscript -cp "java/mhclasses.jar" -jar "java/javafoil.jar"

or, if the script is given as a command line argument instead of defined as a system property with the -D option:

java.exe -cp "java/mhclasses.jar" -jar "java/javafoil.jar" Script=MyScript.jfscript

 

If you want to call the main class directly and not via the -jar mechanism, the command line looks like:

java.exe -DScript=MyScript.jfscript -cp "java/mhclasses.jar" -cp "java/javafoil.jar" MH.JavaFoil.JavaFoil

or, if the script is given as a command line argument instead of defined as a system property with the -D option:

java.exe -cp "java/mhclasses.jar" -cp "java/javafoil.jar" MH.JavaFoil.JavaFoil Script=MyScript.jfscript

 

 

Last modification of this page: 21.05.18

[Back to Home Page] Suggestions? Corrections? Remarks? e-mail: Martin Hepperle.

Due to the increasing amount of SPAM mail, I have to change this e-Mail address regularly. You will always find the latest version in the footer of all my pages.

It might take some time until you receive an answer and in some cases you may even receive no answer at all. I apologize for this, but my spare time is limited. If you have not lost patience, you might want to send me a copy of your e-mail after a month or so.
This is a privately owned, non-profit page of purely educational purpose. Any statements may be incorrect and unsuitable for practical usage. I cannot take any responsibility for actions you perform based on data, assumptions, calculations etc. taken from this web page.

1996-2018 Martin Hepperle
You may use the data given in this document for your personal use. If you use this document for a publication, you have to cite the source. A publication of a recompilation of the given material is not allowed, if the resulting product is sold for more than the production costs.

This document may accidentally refer to trade names and trademarks, which are owned by national or international companies, but which are unknown by me. Their rights are fully recognized and these companies are kindly asked to inform me if they do not wish their names to be used at all or to be used in a different way.

This document is part of a frame set and can be found by navigating from the entry point at the Web site http://www.MH-AeroTools.de/.

Impressum       Datenschutz