This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level. |
F/x uses a language similar to BASIC to allow you to write custom script operators that use F/x's in-built image processing operators. If you're interested, you can even write your own operators. The only thing to keep in mind is that because the scripting language is interpreted, any direct script-based manipulation of images will be quite slow compared to F/x's own image manipulation, or manipulation performed by a plug-in. (Did that get you interested in plug-ins? You'll find plug-in developer information here)
Together, these hold the information regarding the location of the script. "Script File" contains the actual name of the script. "Path" contains the directory in which the script is contained.
Browse allows you to search your computer for the location of the script.
Edit allows you to edit the script with F/x's built-in quick edit window.
New opens up the quick edit window and allows you to save your new script.
F/x's quick edit window will only keep up to 64000 characters. Files in excess of 64000 characters must be done with an outside text editor.
Each .WIS script is a file. You create them with either the built in editor (for scripts up to 64000 characters) or an external text editor for extremely large scripts.
Scripts are normal ASCII text. The filename should have the extension .WIS
The name of the script will be saved when dragged into the TimeLine, this means that different scripts can be used in different frames in the timeline.
.WIS scripts are executed as operators. This means that they go to work when you make an area selection on an image.
In response to the area selection, F/x calls the script, which can then in turn call F/x requesting one or more functions that will work on the area selection.
Or, the script can "talk to" F/x directly, learn where the area selection is, and then process the image data directly. That means that almost any kind of filter or effect imaginable can be created, given the time, energy and incentive.
From the script-user's standpoint, all that needs to be done is select a pre made script, and make an area selection. The script does the rest.
From the script-writer's standpoint, the script can be anything from one line, like this:
10 A=ANNULAR(64,64,255,0,1)
...to almost any complex combination of features and functions and calculations you can imagine. You can find examples of scripts at various levels of complexity here.
.WIS scripting is very similar to the BASIC language. If you're familiar with BASIC, then you should have no trouble at all with F/x's scripting. If you're not familiar with BASIC, then you can either hunt down some tutorial information on the BASIC language (there are lots of these on the web) or you can jump right in and see what you can learn by "winging it." To do that, read the section that follows, and then look over the examples.
The reason we chose BASIC as the model for our scripting language is that BASIC is very easy to learn, in fact it is probably the easiest programming language there is, yet it still provides a great degree of power and flexibility to the user. With that in mind:
In F/x, scripts execute in response to the user making an area selection on an image. The script may issue commands to F/x, causing a predefined function to run, or it may operate directly on image data. The area selection that the user made will control what portions of the image that the script may modify; however, the script may read from any portion of the image, or of the undo buffer which will contain an unmodified copy of the image during the entire script operation. Scripts may access image pixel data as either RGB or HSL entities; you can even access a pixel both ways at the same time. This allows you to process the pixel in a number of useful ways.
Each line in a .WIS script file must begin with a line number. Line numbers are integers from 1 to 32000.
A line may contain one or more statements; when more than one statement is contained in a line, each statement is to be separated by a colon (:).
Blank lines are allowed.
Any number of spaces and/or TAB characters may be entered around line numbers.
Numeric variables are named using one or more alphanumeric characters, with the rule that they must start with an alphabetic character. Numeric variables are case-sensitive; the variable A  is not the same as the variable a . All numbers are floating point numbers; when an integer is required by F/x, the fractional part, if any, of a number is simply discarded.
Text variables are named using one or more alphanumeric characters followed by the dollar sign ( $ ), with the rule that they must start with an alphabetic character. Text variables are case sensitive; the variable A$  is not the same as the variable a$ .
Multiply-dimensioned variables of either type may be created with the DIM  statement.
In the case of both numeric and text variables, names longer than one character are allowed, as long as those names are not the name of any command, function or keyword in the scripting language. For instance, a variable named "peak" is ok, but a variable named "print" is not ok.
The PRINT  statement, while in most ways similar to PRINT in standard BASIC, sends output to a dialog within F/x. This allows you to send messages to the user during script execution.