serdargksn
Centipat
- Katılım
- 4 Temmuz 2022
- Mesajlar
- 36
Daha fazla
- Cinsiyet
- Erkek
Yok hocam aynı sonuç. Kodu sıfırdan bi yazmak istiyorum mantık hatası var. Emeğin için çok teşekkür ederimPython:subprocess.run(["shortcut", "-c", shortcut])
Sorunun kaynağı bu hocam. Shortcut kullanımını bilmediğim için bir şey diyemeyeceğim.
Python:import tkinter as tk from tkinter import messagebox import subprocess def create_shortcut(): first_key = first_key_entry.get() second_key = second_key_entry.get() app = app_entry.get() shortcut = f"{first_key}+{second_key}:{app}" print("shortcut", "-c", shortcut) messagebox.showinfo("Success", "Shortcut created successfully!") root = tk.Tk() root.title("Shortcut Creator") first_key_label = tk.Label(root, text="First key:") first_key_label.grid(row=0, column=0) first_key_entry = tk.Entry(root) first_key_entry.grid(row=0, column=1) second_key_label = tk.Label(root, text="Second key:") second_key_label.grid(row=1, column=0) second_key_entry = tk.Entry(root) second_key_entry.grid(row=1, column=1) app_label = tk.Label(root, text="Application:") app_label.grid(row=2, column=0) app_entry = tk.Entry(root) app_entry.grid(row=2, column=1) create_button = tk.Button(root, text="Create", command=create_shortcut) create_button.grid(row=3, column=1) root.mainloop()
Bu kodu çalıştırın ve çıktıyı gözden geçirin. Çünkü program bunu yürütüyor.