When I try to run code in cmd, it opens vs code

António Rebelo

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")
hYg-Cain

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"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I Make this code run in CMD when i click the jar file

When I try to run my code with the "java" command in the cmd window, I get an error

I've got Could not find or load main class when I try to run my java code

What is happening here? When I try to run this code, the following error appears

Microsoft VS Code: When I try to launch my program error "spawn php ENOENT" shows up

Errors when I try to build my Java project in VS Code

How to run VS Code Insider version when I have regular VS Code installed side by side on MacOS?

VS code gdb exiting immediately when run as vs code debugger

Automatically Run VBA Code when an Excel Workbook Opens

VS Code opens a new debug console every time I build/run

How can I run VBA code when a PowerPoint slide opens

When I try to run or debug my code in Pycharm I only get errors

Pygame window not responding error when i try to run a code

When I run the code chunks everything works but when I try to Knit I get an error

I am trying to make my own Batch Game, but when I try to run the Script/Code it Instantly Closes

Getting TypeError when try to run the python code

CSS file not found error 404 when I try to run flask code

I receive this error 'str' object has no attribute 'text' when I try to run the following code

Why do I get invalid syntax when I try to use pandas to run this code?

Why am I getting a syntax error whenever I try to run VS code python terminal?

I get a syntax error when I import discord in the cmd but not in vs code

UnhandledPromiseRejectionWarning: Error: Cannot find module '../database/db' when i try to run my code

Getting errors when I try to run my PDO code for login form

Why isn't my 'Else' expression showing in this scenario when i try to run my code?

Why when i try run this code in reactjs, its always output wrong total number

VS Code opens "VS" and "code" window every time i open a file

npm ERR! could not determine executable to run - Every time I load up VS Code and try to open Cypress

VS Code keeps saying there is not such file when I try to run my code

Python wont run inside CMD, PS, or VS Code