Xtype random entry , enter 1 from different variation

Hi , any way to give random entery in xtype

for example I’m doing comment in a site but same comment getting blocked after 10 time posting the comment

so any way to give options like comment 1 - comment 2 - comment 3 - comment 4 - comment -5 -comment 6 … extra

and make the macro choose randomly one of them or / post comments by loop like firs post 1 comment - 2nd post 2nd comment … seven post 1st comment ??

thanks

Yes with ui vision you can do all.

Create a csv with all comment, after you randomize it, it’s simple.

You can create comment in array to and randomize it too.

hi , sorry how to make it chose one of comments after create comments in csv ??

You can choice random comment from csv with a random command changing !csvReadLineNumber or you can use loop to read all lines of csv with comments

Here an example

Hi thanks I tried to follow codes but it stopped auto fill comment ,

I got error with type name=repsponsible ${!COL1}”

any suggestions plz ?!!

{
“Name”: "comment ",
“CreationDate”: “2020-8-10”,
“Commands”: [
{
“Command”: “store”,
“Target”: “{!loop}", "Value": "!csvReadLineNumber" }, { "Command": "csvRead", "Target": "comment.csv", "Value": "" }, { "Command": "bringBrowserToForeground", "Target": "", "Value": "" }, { "Command": "XType", "Target": "{KEY_PGDN}”,
“Value”: “”
},

{
  "Command": "pause",
  "Target": "5000",
  "Value": ""
},

{
  "Command": "waitForPageToLoad",
  "Target": "10000",
  "Value": ""
},
{
  "Command": "times",
  "Target": "500000",
  "Value": ""
},
{
  "Command": "click",
  "Target": "xpath=(//*[@id=\"video-title\"]/yt-formatted-string)[${!TIMES}]",
  "Value": ""
},
{
  "Command": "waitForPageToLoad",
  "Target": "3000",
  "Value": ""
},
{
  "Command": "click",
  "Target": "xpath=//ytd-toggle-button-renderer/a/yt-icon-button/button/yt-icon",
  "Value": "",
  "Targets": [
    "xpath=//*[@id=\"button\"]/yt-icon",
    "xpath=//ytd-toggle-button-renderer/a/yt-icon-button/button/yt-icon",
    "css=#button > yt-icon"
  ]
},
{
  "Command": "XType",
  "Target": "${KEY_PGDN}",
  "Value": ""
},
{
  "Command": "click",
  "Target": "id=placeholder-area",
  "Value": "",
  "Targets": [
    "id=placeholder-area",
    "xpath=//*[@id=\"placeholder-area\"]",
    "xpath=//div[@id='placeholder-area']",
    "xpath=//ytd-comment-simplebox-renderer/div",
    "css=#placeholder-area"
  ]
},
{
  "Command": "type",
  "Target": "name=repsponsible",
  "Value": "${!COL1}”"
},
{
  "Command": "click",
  "Target": "xpath=//ytd-button-renderer[2]/a/paper-button/yt-formatted-string",
  "Value": "",
  "Targets": [
    "id=text",
    "xpath=//*[@id=\"text\"]",
    "xpath=//ytd-button-renderer[2]/a/paper-button/yt-formatted-string",
    "css=#text"
  ]
},
{
  "Command": "pause",
  "Target": "5000",
  "Value": ""
},
{
  "Command": "echo",
  "Target": "Loop Number ${!TIMES} Completed",
  "Value": "#shownotification"
},
{
  "Command": "end",
  "Target": "",
  "Value": ""
},
{
  "Command": "echo",
  "Target": "Macro Finished",
  "Value": "#shownotification"
}

]
}

Fix this error

"Value": "${!COL1}”"

The code seems to confused and not optmized, it’s a simple youtube commenter can be realized in better way more fast and efficient.

I already asked how to fix this error and you till me fix it !!

Search:

"Value": "${!COL1}”"

Change with

"Value": "${!COL1}"

I answered here: Reading CSV from line 3

Please do not post the same question in two forum threads.