thank you! The macro ends with no errors, but it never show me the random word. I tried to add your code to a new macro just to test it. Here’s my code:
{
“Name”: “1”,
“CreationDate”: “2021-3-7”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://contacaratteri.it/”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=textinfo-ctrl-text”,
“Value”: “”,
“Targets”: [
“id=textinfo-ctrl-text”,
“xpath=//[@id="textinfo-ctrl-text"]",
“xpath=//textarea[@id=‘textinfo-ctrl-text’]”,
“xpath=//textarea”,
“css=#textinfo-ctrl-text”
]
},
{
“Command”: “click”,
“Target”: “id=textinfo-ctrl-text”,
“Value”: “”,
“Targets”: [
“id=textinfo-ctrl-text”,
"xpath=//[@id="textinfo-ctrl-text"]”,
“xpath=//textarea[@id=‘textinfo-ctrl-text’]”,
“xpath=//textarea”,
“css=#textinfo-ctrl-text”
]
},
{
“Command”: “comment”,
“Target”: “type // id=textinfo-ctrl-text”,
“Value”: "a ",
“Targets”: [
“id=textinfo-ctrl-text”,
“xpath=//*[@id="textinfo-ctrl-text"]”,
“xpath=//textarea[@id=‘textinfo-ctrl-text’]”,
“xpath=//textarea”,
“css=#textinfo-ctrl-text”
]
},
{
“Command”: “comment”,
“Target”: " // ",
“Value”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var letters = [‘a’,‘b’,‘c’,‘d’,‘e’,‘f’,‘g’,‘h’,‘i’,‘j’,‘k’,‘l’, ‘m’,‘n’,‘o’,‘p’,‘q’,‘r’,‘s’,‘t’,‘u’,‘w’,‘x’,‘y’,‘z’]; var string = ‘’; for(var i = 0; i < 9; i++){string += letters[parseInt(Math.random() * 25)]}; return string;”,
“Value”: “v1”
},
{
“Command”: “echo”,
“Target”: “Random Value Is ${v1}”,
“Value”: “#shownotification”
},
{
“Command”: “comment”,
“Target”: “open // https://contacaratteri.it/”,
“Value”: “”
}
]
}
contacaratteri.it is a site that counts how many characters you wrote. I used it for trying the code because I needed a blank space