when I try to run python code on the command prompt, it automatically opens vs code. I want to run the code on the command prompt. How do I fix this?
This is the code:
import pyautogui as spam
import time
limit = int(input("Enter the number of messages you want to send: "))
msg = input("Enter the message you want to send: ")
time.sleep(3)
for i in range(0,limit 1):
spam.typewrite(msg)
spam.press("Enter")
CodePudding user response:
Your machine does not automatically executes python files with python but as default opens them with VS Code.
I assume you call it via "yourprogram.py". Call it with "python .\yourprogram.py"