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 📂.
But every time I open my computer, instead of running the program it opens vscode.
To prevent that I changed the default application for .py
files to python.exe but it is still showing the same behaviour.
Please help.
Right click the file, select "open with", select "choose another app" at the bottom, select "Python", and check "always use this app" at the bottom