scripting

2013-05-13
2013-06-22
  • s gallaghan

    s gallaghan - 2013-05-13

    Hi
    how do I go about creating scrips (I notice there is a hello.js to run but I can't find documentation on how to create my own)

     
  • Bruce Martin

    Bruce Martin - 2013-05-13

    At the moment the whole script area needs more work / Documented. For the moment,
    can you tell me what you want to do, and I will try to help you

    1) What do you want to do in the script and which scripting language do you want to use ???
    JavaScript is built in to java, other language have to be added

    Starting with basics, there are 2 types of script

    • Exports Scripts - these receive a view and a output file and are expected write
      the view to the file.
    • Scripts - more general scripts. At the moment they allow you access / update the file / view.
      There is little access to the Gui. If you need additional functions let me know
      and I will add it if I can.

    Getting the location for scripts

    • Start the RecordEditor
    • Edit a File
    • Select File >>> Export Via Script >>> (Run Script)
    • In the middle of the page there is a Script field, this will hold the Export Script
      Directory
      (i.e C:\Users\Bruce\RecordEditor_HSQL\User/ExportScripts/). For the normal scripts
      change ExportScripts to Scripts (i.e. C:\Users\mum\RecordEditor_HSQL\User/Scripts/)

    Other Scripts

    In the Scripts directory, you should find 2 small Jython scripts:
    AddSepToLineEnd.py - Adds a field-Separator to the End of the Line in CSV files
    EnsureCorrectNumberOfFieldSeporators.py - Ensures each line in a CSV file
    has the correct number of lines.

    Changing the script Directory

    • In the RecordEditor, Select Edit >>> Edit Options
    • Select the properties Tab
    • The Last 2 fields hold the ExportScript & Script directories
     
  • Bruce Martin

    Bruce Martin - 2013-06-22

    In version 0.94.4 there have been a number of Scripting related changes

    • More Script related functions
    • Some basic documentation on writing scripts
    • More Example scripts
    • Basic Script Editor added
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks