THIS IS THE V2 CODE. Drag, scroll or use arrow keys to navigate When you get to the website, scroll to the bottom and copy the code If the website is blocked... IDEK, use google docs or else just use your current method Or paste to instructions or get a link to download. Code | | \/ import tkinter as tk from tkinter import Menu from tkinter import filedialog usedname = None def new_file(): global usedname textbox.delete('1.0', tk.END) usedname = None print('New file created') def save_file(): global usedname text = textbox.get("1.0", tk.END) if usedname: with open(usedname, "w") as file: file.write(text) print('Saved file as ' + str(usedname)) else: file_path = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text files", "*.txt"), ("All files", "*.*")]) if file_path: with open(file_path, "w") as file: file.write(text) print('Saved file as ' + str(file_path)) usedname = file_path def quicksave(): global usedname if usedname: text = textbox.get("1.0", tk.END) with open(usedname, "w") as file: file.write(text) print('Quicksaved file as ' + str(usedname)) else: save_file() def load_file(): global usedname file_path = filedialog.askopenfilename(filetypes=[("Text files", "*.txt"), ("All files", "*.*")]) if file_path: with open(file_path, "r") as file: text = file.read() textbox.delete("1.0", tk.END) textbox.insert(tk.END, text) usedname = file_path print('Loaded file ' + str(file_path)) root = tk.Tk() root.title("Editript") root.geometry("480x360") menu_bar = Menu(root) root.config(menu=menu_bar) textbox = tk.Text(root) textbox.tag_config("colored", foreground="blue", background="yellow") textbox.pack(expand=True, fill='both') file_menu = Menu(menu_bar, tearoff=0) menu_bar.add_cascade(label="File", menu=file_menu) file_menu.add_command(label="New", command=new_file) file_menu.add_command(label="Save", command=quicksave) file_menu.add_command(label="Save As", command=save_file) file_menu.add_command(label="Open", command=load_file) file_menu.add_separator() file_menu.add_command(label="Quit Editript", command=root.quit) print('Successfully started Editript (Python 3.4+)') print('Do not close this window') root.mainloop() print('Successfully shut down Editript (Python 3.4+)')
All by me except actual python code. NVM gonna turn this into a template, code will be simple now. I spent 2 hours on this :(