Scripting tips and tutorials - RealWorld forums

Log-in or register.

Scripting tips and tutorials

on September 22nd 2013

For those looking to learn how the scripts work, I recommend to look at the scripting tutorial and to read the documentation. Also, the cursor wizards in the cursor editor are scripted and are good examples of scripts (look here).

on October 17th 2013

The Configuration object got a bit smarter in the later versions and it is not documented anywhere. Using GetValueOrDefault() should not be necessary anymore. When defining a new configuration field, using

Configuration.AddEditBox("z", "Z", "", 0.8);

should be perfectly fine and the last used value will be remembered. In the rare cases, where that is not the desired behavior, you can use an extra parameter at the end and set it to "true":

Configuration.AddEditBox("z", "Z", "", 0.8, true);

When reading the set values in the execution script, you can just type:

var z = Configuration.z;

That is only possible if the name of the parameter is a valid JavaScript identifier (does not have weird characters or spaces in it).

The JavaScript engine used in RW apps is the default engine that comes with Windows/Internet Explorer - having later versions of IE installed (even if you do not use it) may result in better speeds.

on November 8th 2013

Turning the Preview on and off
Alot of the scripts Ive done are real slow, due to that if you have the preview on it can be really annoying haveing to wait wonks for anything to happen.
Turning the preview on and off is easy once you know how.
When you click on the Custom Operation and the script panels come up one of them is Preview, select it.
If you want a preview then for the Preview drop down select "Image - Viewer", otherwise select ">> Empty View <<".

on March 17th 2014

**A tip for newbies**

RWPaint utilizes Javascript, and for anyone starting out with scripting like me, this is a great way to learn the language interactively: Eloquent Javascript

Page views: 1597       Posts: 4      
I wish there were...
Select background
What about ICL files?