Open topic with navigation

# LuaScript

The path to a Lua script that returns the rectangle to add to the record. Specify an absolute path, or a path relative to the LuaDirectory.

The Lua script must define a function named `rectangle`, which must return the rectangle. The function takes a single argument, an input record.

The following is an example Lua script that you could use to take a region that exists in the input records and add a new region that is 50 pixels further left and 50 pixels higher in the image.

    function rectangle(r)
        return { left=r.RegionData.left - 50, top=r.RegionData.top - 50, width=r.RegionData.width, height=r.RegionData.height }
    end

If your Lua function returns an invalid rectangle, the record is discarded.

Type: | String
Default: |
Required: | Yes
Configuration Section: | TaskName
Example: | `LuaScript=rectangle.lua`
See Also: |

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm