hey everyone hope you guys are well so today i am going to show you how you guys
can send a message continuously to your friends or someone especially or anyone
else in Facebook or WhatsApp by using just four lines of code just four lines of code just for
line yes it is true so let's go to our python editor and if you guys are new in my channel
then like this video subscribe my channel and hit the bell icon for the new exciting videos and if
you guys already subscribed my channel then thank you so much for coming back you guys are amazing
so let's go to our code editor so in code editor you have to just create a new file so just right
click on this and new and then you have to click python file now you have to select a name that
mine is mine dot pi so just enter
so yeah here is our file now we just have to do one thing which is we have to install a package
so go to terminal
and you just have to type pip install by auto gui yeah that's it and just type in enter
so after some time it will be installed to your project file you just have to wait yeah that's it
now we just have to simply import this file so that's why import
by auto gui yeah that's it now i want to run this file continuously so that's why i will type
file and this is true
that's it now i want to type a message so that's why we just have to type by auto gui
dot then type right that's it then parenthesis and
inside this parentheses we have to just write our message what we want to send someone so
so yeah this is my message and after typing our message we just have to
type on enter or send button so that's why i i will again call by auto gui
dot then we have to press enter or send button so that's why press
again parenthesis and inside this parenthesis we have to click enter so that's it we are done
now we just have to do one more thing which is we have to import
time which is our built-in package
so that's it and after this message
i sent now after send this message we have to wait for some time so let's take four second
it means after sending this message it will wait for four second so that's why
time dot sleep okay now we have to put there second so let's take four second
and after writing and sending this message i want to wait for another two second so that's why time
dot sleep will be two seconds so that's it our program is finished now it's time to see so go to
your messenger then this pointer should be in your type a message option you can see that this cursor
should be in your type a message option or box so go to the python again and you have to just run
run and click main that's it and here you can see that
hello how are you and waiting two seconds yeah writing again waiting for second again writing
four seconds writing waiting two seconds sent
again writing waiting two seconds sent yeah that's it
i am not typing this message guys it is just going on going on and it will do continuously
so if you guys want to stop this message what you have to do you have to do is what just
click on this red option yeah you can see that here is our message and this is typing and this is
sending now yes writing and descending again two second pause and writing and then again sending
then you guys can see that you guys can see what is going on here it is just lighting and sending
so if you guys want to stop this just you have to just click on this red button
just click on this red button and yes this will be stopped
yeah that's it and if you guys want to okay let me just
get rid of this
and if you guys want if you guys want to limit your messages then let me take a variable
message so i want to send a message for five times so that's why it will be
just five and then let's change this
message who are you i don't know you so yeah so let's change this to this true yeah while we true
so this means it will send continuously but we don't want to sign continuously we just want to
send five times so that's why it will be message and every time you send this message this
number will be decreasing so that's why message greater than zero if message greater than 0 then
it will this loop will go on so and message equal to message minus 1 that's it
so after loop one this five will here and five minus one is four so this new value will stored in
four here okay so this will be now four and again it will loop and this time this 4 will be here
4 minus 1 is 3 then it will be 3 again here and after loop another 1 then
this will be 3 and 3 minus 1 is 2 and this will be 2 and this is true because 2 is greater than 0
again it this loop will happen and this one this thing will be 1 and 1 minus 1 is 0 and then
this will be 0 and after 0 will be here then 0 greater than 0 it is false condition so that's
why our loop will be disconnected so let's see this you have to just run and run again and main
and here and yes so let's see what happened yes one typing send this is to again typing
and send
this is 3 and again typing under send this is 4 this is last one will happen now typing and send
yeah that's it so our program will not able to send message continuously because we have
limited his condition or her condition
so he will just do things for five times so that's it one two three four five yeah that's it so
so that's it thank you everyone hope you enjoyed this video and if
you really enjoyed this video then comment below and let me know some of your opinions you