How do I execute a script? - RealWorld forums

Log-in or register.

How do I execute a script?

Fine, say it. I'm a n00b.
Mikey Z
on November 4th 2013

I just learned about the scripting thing a little bit ago, and while it's awesome, I can't figure out how to use it. Is there some "go" button I'm not seeing? Am I supposed to hit enter twice or something? I can't haven't a clue how to run scripts!

Vlasta
on November 4th 2013

You are not a noob, it is just the help for the application is still far from complete.

The simplest way to start with scripts is via the "Effect"->"Custom operation" command. There is also "Custom JScript operation" button in the toolbar. Ah, and it is currently visible only when a raster layer is selected. It is not that scripting is impossible in vector layers, but none has made a script for a vector layer yet and I kind of forgot to include this button in the user interface. It is possible, but not easy to re-configure the application to show this button. I'll definitely add it in the next version. If you really want it now, let me know and I'll try do describe the procedure of adding it as good as possible.

Mikey Z
on November 5th 2013

Thank you!

one more question though. In the Command Line panel at the bottom, what do you do with that? All I figured out is that you can edit the vertex coordinates of Vector Polygons with that, and you click the panel in the middle to activate it.

Vlasta
on November 5th 2013

It shows you how the command for the thing you are currently drawing would look like if you were using it in a script. So, you can for example copy the whole line and the paste it into your script and eventually modify it further.

Another use is to directly modify the numbers as you said. If you know that your rectangle should be centered at precise coordinates you can roughly draw it and then modify the numbers to exactly match what you want.

It is also handy if you want to actually see all the coordinates of a polygon or something else.

Some more info is here. You can also use simple expressions in the command line.

Page views: 2250       Posts: 4      
Select background
I wish there were...
Vista & Win 7 icons