Help with creating auto follow macro

I’m trying to figure out how to set up a macro that will check to see if a button is in the “following” state if it is not then click the button “follow”, then scroll the page down so more content with follow button loads in.

The button class looks like “mv-button primary rounded outlined”

if the button has been selected all ready is is in “following” state it will not have the class “outlined”

I did a record in UI Vision and this is the target that it finds when I click on some follow buttons. So it looks like I need some kind of loop that will cycle through some divs. I’m not sure. Pretty lost here guys.
xpath=//[@id=“app”]/div/div[2]/div[2]/div[4]/button
xpath=//
[@id=“app”]/div/div[2]/div[3]/div[4]/button
xpath=//[@id=“app”]/div/div[2]/div[4]/div[4]/button
xpath=//
[@id=“app”]/div/div[2]/div[5]/div[4]/button

The code below pretty much works, but I need to make it better to loop through the divs.

{
“Name”: “ManyVids_ Follow”,
“CreationDate”: “2020-2-14”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.manyvids.com/Social/Dolores_Flow/1003068785/Followers”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“app”]/div/div[2]/div[1]/div[4]/button",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div/div[2]/div[2]/div[4]/button”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“app”]/div/div[2]/div[3]/div[4]/button",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div/div[2]/div[4]/div[4]/button”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“app”]/div/div[2]/div[5]/div[4]/button",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div/div[2]/div[6]/div[4]/button”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“app”]/div/div[2]/div[7]/div[4]/button",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div/div[2]/div[8]/div[4]/button”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“app”]/div/div[2]/div[9]/div[4]/button",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div/div[2]/div[10]/div[4]/button”,
“Value”: “”
},
{
“Command”: “sendKeys”,
“Target”: “xpath=/html/body/div[1]”,
“Value”: “{KEY_PGDN}" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[11]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[12]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[13]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[14]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[15]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[16]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[17]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[18]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[19]/div[4]/button", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"app\"]/div/div[2]/div[20]/div[4]/button", "Value": "" }, { "Command": "sendKeys", "Target": "xpath=/html/body/div[1]", "Value": "{KEY_PGDN}”
}
]
}

Hey, I was just wondering if you got this working? I’m attempting to do something similar but no idea where to start really!

This code is not good, you can creaet a short, fast and working code using loop