The document outlines 7 stages of a process to automate messaging. Stage 1 involves retrieving and cleaning messages from a variable. Stage 2 verifies the completeness of the messages. Stage 3 selects and randomizes the messages without repetition. Stage 4 retrieves messages from randomization function on an interval. Stage 5 retrieves and sends a single first message. Stage 6 sends the messages by typing in a chat input field. Stage 7 reminds to keep the coding simple while meeting requirements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views2 pages
Chat Instruction
The document outlines 7 stages of a process to automate messaging. Stage 1 involves retrieving and cleaning messages from a variable. Stage 2 verifies the completeness of the messages. Stage 3 selects and randomizes the messages without repetition. Stage 4 retrieves messages from randomization function on an interval. Stage 5 retrieves and sends a single first message. Stage 6 sends the messages by typing in a chat input field. Stage 7 reminds to keep the coding simple while meeting requirements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2
stage 1 using Java Script
my_message{!hi", "are we good?", "letsplay"}
1. create function named import_messages that retreaves messages from variable named my_messages. 2. inside import_messages function, cleen the messages using the re methid. 3. Inside import_messages function, calculate the expected length of each message after cleening. 4. inside import_messages function, convert the messages in to dictionarys after calculating the expected lenthg.
stage 2 do the following:
1. create function name complete_messages that retreaves the messages from import_messages function. 2. in complete_message, verify the completeness of each message using the expected lenthg methid. 3. in complete_message return the verified messages as dictionary.
stage 3 do the following.
1. create function name randummize_messages that retreaves the messages from the complete_message function. 2. inside randumize_messages, select a randum message using the shuffle methid with .coppy. 3. inside randumize_messages, make shore that the same selected message is not repeated.
stage 4 do the following:
1. create function named messages_interval that sets a interval time of 9 to 11 minuts but do not place the intervals 9 to 11 in the function arguments. 2. inside messages_interval function, retreave the selected mesages from the randomize_messages function every time the interval is completed. 3. inside interval_messages function, call and pass the selected message to a function named send_message after it has been retreaved.
stage 5 do the following:
1. create function named first_message that retreaves a message only once from the randimize_messages function. 2. inside first_message function, after the message has been retreaved from the randum_messages function, call and pass it to a function named send_messages.
stage 6 do the following:
1. create function named send_messages. 2. inside send_messages function, using the most efective methid check to see if the curser is inside a element named chat_input, if it is not then set a counter, that increments every time the curser is not inside chat input, refresh the page, sleep for 10 seconds then use return to try again, if the counter reaches 5 close the browser and print message website issues, but if the curser is inside chat input continnue with the rest of the function. 3. inside send_messages function check to see if there is text inside chat input before typing the message, if there is clear it. 4. inside send_message function, set up a maximum time of 10 seconds for the message to be typed and sent, if this time expires before the message has been typed and sent, clear chat input, sleep for 30 seconds then return and try again with the same message. 5. inside send_message function, use ActionChains and char to type the message. 6. in send_message function, do a random pause between 0.01 and 0.03 after every character is typed. 7. in side send_message function, using .text methid, verify that the message has been completely typed. 8. inside send_message function, if the verification concludes that the message was not completely typed, clear and return to try again with the same message. 9. inside sen_message_ function, send the message by sending enter key using ActionChains but only if the message has been verifyed as completely typed.
stage 7 atention. remember to make the codeing as simple as possable but it must comply 100% with all of the requirements.