I am trying to make a spambot. I am using VS code to edit and run the code but it doesn't work.
import time
import pyautogui as py
running = True
time_till_done = int(input("How many times to spam?: "))
spam_speed = float(input("How fast do you want to spam?: "))
what_to_spam = input("What do you want to spam?: ")
time.sleep(5)
while running:
time.sleep(spam_speed)
py.typewrite(what_to_spam)
py.press("enter")
time_till_done = time_till_done - 1
if time_till_done == 0:
running = False
time.sleep(5)
When I run the code i get :
PS C:\Users\dante\IdeaProjects\Coding> & c:/Users/dante/IdeaProjects/Coding/venv/Scripts/python.exe "c:/Users/dante/IdeaProjects/Coding/Codes/Making codes/spambots.py"
Traceback (most recent call last):
File "c:\Users\dante\IdeaProjects\Coding\Codes\Making codes\spambots.py", line 2, in <module>
import pyautogui as py
ModuleNotFoundError: No module named 'pyautogui'
why is this happening? I tried using intellij and pycharm and both work fine.
source https://stackoverflow.com/questions/70932318/no-module-named-pyautogui-when-code-run-from-vscode
Comments
Post a Comment