What should I do to replace indexOf with new version?

I used to have this script:

 {
      "Command": "sourceExtract",
      "Target": "<a aria-label=\"Organize\" class=\"Wk9 xQ4 CCY czT fev iyn kVc FTD L4E DI9 BG7\" href=\"*_tools/organize/?organization_feed=False\" rel=\"\" tabindex=\"0\">",
      "Value": "boardLink",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${boardLink}",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "var a = ${boardLink}; \nvar b = a.substring(a.indexOf('href=\"'),a.length);\nvar c = b.indexOf('_tools/organize/?organization_feed');\nvar d = b.substring(0,c);\nvar e = 'href=\"/';\nvar f = e.length;\nvar g = d.slice(f);\nreturn g;",
      "Value": "boardLink",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${boardLink}",
      "Value": "green",
      "Description": ""
    },

It first returns

<a aria-label="Organize" class="Wk9 xQ4 CCY czT fev iyn kVc FTD L4E DI9 BG7" href="/notosherilyn/earth-bundle-30-designs-220404/_tools/organize/?organization_feed=False" rel="" tabindex="0">

And after the executeScript_Sandbox command, it’ll returns

/notosherilyn/earth-bundle-30-designs-220404/

Now it can’t work, it returns this error:

How can I fix this? @admin @TechSupport @ulrich

Is it ok if you change executeScript_Sandbox by executeScript ?

No, that’s why I’m here.

This update is killing me everything is broken!!! Their is no way to include a .includes statement within a target without throwing this error and .indexof statement does not work either! CAn you all please post the archived version of Ui.Vision or a solution to fix this issue??

1 Like