Community

Using C#.NET Scripts

Hi, This is regarding the Invoice Accelerator project.

Does anyone have any examples of using c# .net in the auto-correction script and also for Custom Actions? I have gotten a script to work from the Custom Actions to check the PO number and manipulate it, but it would be better to do this from the auto correct script area. It seems accessing the fields(objects/Methods) is a bit different and I am not seeing anything in the help file for the difference besides some vb/js examples.

Second, string manipulation in c# is easier to code and read as compared to regex’s. Does anyone know if there is a comparative speed difference when using c# as compared to regex’s? Is there a speed difference in using c# over vb/js script inside ABBYY?

Thanks much,

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Andrew Zyuzin
    Hi

    Auto-correction script

    // get field text
    string FieldValue = Value.Text;
    /* some operations on FiledValue */
    // set field text
    Value.Text = FieldValue;

    Custom Action

    // get field text
    string FieldValue = Context.Text;
    /* some operations on FiledValue */
    // set field text
    Context.Text = FieldValue;

    I'm not sure that using AutoCorrect script is a good idea, why don't you use usual script rule? It has the same objects available as Custom Action

    Can't tell about regex, but C# (and other .Net language) is slightly slower than VB/JS. Nonetheless I allege that you will not notice this difference in real life processing - the speed is enough not to freeze UI and not to slown down the whole processing.
    0

Please sign in to leave a comment.