Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7712
    mldisibio
    Participant

    I have a macro which calls
    “clipboardData.clearData(“Text”);
    and which was working fine up to v9.01

    I now get an “Unspecified Error” popup pointing to that line in the macro.
    If I comment out the line, the Macro works as expected.

    I also tried:
    clipboardData.clearData(“text”)
    clipboardData.clearData();
    clipboardData.clearData(“Text”,0);
    all of which throw the exception.

    #7713
    mldisibio
    Participant

    Okay, one more test occurred to me after I posted.

    The line “clipboardData.clearData()” fails if there is nothing in the clipboard.
    Since I have been using this macro for months, I am not sure if this is a new behavior or simply a very coincidental situation I never encountered before, but I would very likely have run the macro with an empty clipboard, at least once.

    I added this code, and now the line does not fail:
    var cpd = clipboardData.getData(“Text”);
    if(cpd.length > 0)
    clipboardData.clearData();

    I created a one line macro that simply clears the clipboard of any data in order to verify the conditions.

    In other words, if I highlight some text and perform a “copy”, then there is data in the clipboard and the macro works without the check clause.
    However, if I clear the data once, and then call the macros without checking, the line fails.

    This may be the correct behaviour, but as I said, seems odd that the exception was never raised before v9.01.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.