Home > front end >  How to I prevent vscode from opening while running a file in startup
How to I prevent vscode from opening while running a file in startup

Time:03-21

Hi

I made a simple app to always run on start up.

Here is the script:

import os
import webbrowser
import tkinter as tk
from tkinter import Canvas

wifiURL = 'https://168.1.254:8090/httpclient.html'
chromePath = 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.exe'

def PlayGame():
    os.startfile("C:\Customization\Games shortkuts")

def MakeGames():
    os.startfile("C:\Customization\Gamedev shortkuts")

def LoginWIFI():
    webbrowser.get('C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google 
Chrome.exe %s').open(wifiURL)


root = tk.Tk()

Canvas = tk.Canvas(root,bg="Gray")
Canvas.pack()

Login = tk.Button(Canvas, text="Login", padx= 50, pady=0.8, command=LoginWIFI)
Login.pack()

PlayGames = tk.Button(Canvas, text="Play Games", padx=50,pady=0.8,command=PlayGame)
PlayGames.pack()

GameDev = tk.Button(Canvas, text="Game development", padx=50,pady=0.8,command=MakeGames)
GameDev.pack()

root.mainloop()

To run it every time on startup I made a shortcut and copied it to the startup folder

  • Related