π² Launch Random App with Python | FuzzuTech GUI Project
Demo :
Click Video πππ
π‘ Features :
-
Offline Python GUI Project
-
Automate Daily Tasks with Fun
-
Perfect for Beginners and Hobby Coders
-
Fully Customizable Path List
-
Fun + Practical Use Case
Code :
import tkinter as tk
import random
import os
from tkinter import messagebox
import customtkinter as ctk
# Configure appearance
ctk.set_appearance_mode("System")
ctk.set_default_color_theme("blue")
# List of app paths (Windows Example)
app_paths = [
"C:\\Windows\\System32\\notepad.exe",
"C:\\Windows\\System32\\calc.exe",
"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"C:\\Windows\\System32\\mspaint.exe",
"C:\\Program Files\\Corel\\CorelDRAW Graphics Suite 2021\\Programs64\\CorelDRW.exe"
]
# Function to launch random app
def launch_random_app():
try:
random_app = random.choice(app_paths)
os.startfile(random_app)
messagebox.showinfo("Launched", f"Launching: {os.path.basename(random_app)}")
except Exception as e:
messagebox.showerror("Error", f"Something went wrong:\n{e}")
# Create main window
app = ctk.CTk()
app.title("Random App Launcher")
app.geometry("400x250")
# app.iconbitmap("assets/icon.ico") # optional icon
# Heading
title_label = ctk.CTkLabel(app, text="π² Random App Launcher", font=("Segoe UI", 22, "bold"))
title_label.pack(pady=20)
# Launch Button
launch_button = ctk.CTkButton(app, text="Launch Random App", font=("Segoe UI", 18), command=launch_random_app)
launch_button.pack(pady=30)
# Footer
footer = ctk.CTkLabel(app, text="Made with ❤ by Fuzzu Developer", font=("Segoe UI", 12))
footer.pack(side="bottom", pady=10)
# Run app
app.mainloop()
Comments
Post a Comment