Skip to content

Instantly share code, notes, and snippets.

@senechaux
Last active June 27, 2022 10:15
Show Gist options
  • Save senechaux/2bf51f8c633e8306d543429a978b49d4 to your computer and use it in GitHub Desktop.
Save senechaux/2bf51f8c633e8306d543429a978b49d4 to your computer and use it in GitHub Desktop.
Script wordle para escribir palabras
const words=["pauta","enero","dudar","logro","sushi","pañal","caida","cargo","tenaz","firme","fresa","teñir"];
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const writeWords = async (words) => {
let index = 0;
for (const word of words) {
console.log('write word '+(++index)+'/'+words.length+': '+word);
const letters = Array.from(word);
for (const letter of letters) {
$(".chakra-button[aria-label="+letter+"]").click();
await sleep(50);
}
$(".chakra-button[aria-label^=procesar]").click();
await sleep(1300);
}
console.log("GO GO GO!")
};
writeWords(words);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment