Skip to content

Instantly share code, notes, and snippets.

@dpw1
Created December 11, 2018 21:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpw1/1240ebc0c04f5b39f982fd285dc604be to your computer and use it in GitHub Desktop.
Save dpw1/1240ebc0c04f5b39f982fd285dc604be to your computer and use it in GitHub Desktop.
Facebook Groups Automatic Post (text + local file) for Kantu Browser Extension
{
"Name": "Facebook Group",
"CreationDate": "2018-12-11",
"Commands": [
{
"Command": "comment",
"Target": "Modify the two variables below. For posttext Use ${KEY_ENTER} for line breaks. For postfile remember it's a local file.",
"Value": ""
},
{
"Command": "store",
"Target": "Hey everyone!${KEY_ENTER}${KEY_ENTER}This is an automated message.",
"Value": "posttext"
},
{
"Command": "store",
"Target": "D:\\doodle.png",
"Value": "postfile"
},
{
"Command": "comment",
"Target": "Code starts here!",
"Value": ""
},
{
"Command": "csvRead",
"Target": "websites.csv",
"Value": ""
},
{
"Command": "open",
"Target": "${!COL1}",
"Value": ""
},
{
"Command": "waitForPageToLoad",
"Target": "6000",
"Value": ""
},
{
"Command": "comment",
"Target": "Find the image for the textarea",
"Value": ""
},
{
"Command": "XClick",
"Target": "apEQRu_dpi_96.png",
"Value": ""
},
{
"Command": "storeEval",
"Target": "Math.floor(Math.random()*500)",
"Value": "waittime"
},
{
"Command": "pause",
"Target": "${waittime}",
"Value": ""
},
{
"Command": "XType",
"Target": "${posttext}",
"Value": ""
},
{
"Command": "storeEval",
"Target": "Math.floor(Math.random()*700)",
"Value": "waittime"
},
{
"Command": "pause",
"Target": "${waittime}",
"Value": ""
},
{
"Command": "type",
"Target": "css=div[class]>[name*=\"composer_photo\"][type=file][class][data-testid]",
"Value": "${postfile}"
},
{
"Command": "waitForVisible",
"Target": "css=#pagelet_group_composer .clearfix span[id] button[type='submit']:not(disabled)",
"Value": ""
},
{
"Command": "storeEval",
"Target": "Math.floor(Math.random()*500 + 7000)",
"Value": "waittime"
},
{
"Command": "pause",
"Target": "${waittime}",
"Value": ""
},
{
"Command": "click",
"Target": "css=#pagelet_group_composer .clearfix span[id] button[type='submit']:not(disabled)",
"Value": ""
},
{
"Command": "storeEval",
"Target": "Math.floor(Math.random()*2000 + 3000)",
"Value": "waittime"
},
{
"Command": "pause",
"Target": "${waittime}",
"Value": ""
},
{
"Command": "echo",
"Target": "${!LOOP}. ${!COL1} Finished",
"Value": ""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment