【发布时间】:2016-09-08 10:44:37
【问题描述】:
我想做以下帮助我制作这个脚本:
if form text include = "ABC" (for example: "Whatever words ABC")
then delete the word "ABC" (so it become "Whatever words")
AND
if form text doesn't include = "ABC"
then add the word at the end "ABC (so it become "Whatever words ABC")
请注意:我不想只触摸包含的字符串"ABC" 的部分,或者只删除这部分。
希望你能理解。
我需要这个脚本在 iMacros(网络自动化软件)下工作
已解决: SET !VAR2 EVAL("'{{!EXTRACT}}'.includes('ABC') ? '{{!EXTRACT}}'.replace('ABC','') : '{{!EXTRACT}} ABC';")
【问题讨论】:
-
伙计们,我真的很抱歉我需要这个脚本在 iMacros(一个网络自动化软件)中工作我希望你知道,它使用 javascript 结合它自己的脚本我不知道是什么他们称之为但它有点不同。请告诉我如何使这个脚本在那个非常有用的程序下工作。
-
已解决:经过一些深入的搜索和跟踪和错误,我想通了: SET !VAR2 EVAL("'{{!EXTRACT}}'.includes('ABC') ? '{{!EXTRACT }}'.replace('ABC','') : '{{!EXTRACT}} ABC';")
标签: javascript automation imacros