#SingleInstance Off Gui, Color, , F0F0F0 ;Change the background colour here Gui, +LastFound Gui, Margin, 5, 5 Gui, Font, s18 c000000, Cambria ;Change the font size (s), colour (c), or type here Gui, Add, Edit, vMyEdit w900 h800 +Multi +WantReturn +WantTab -VScroll ;Change the window size here (w and h) Gui, -MaximizeBox Gui, -MinimizeBox Gui, Show,, ; Save functionality (Ctrl+S) ^s:: Gui, Submit, NoHide if (CurrentFilePath = "") { ; If no file is currently open, behave like Save As FileSelectFile, SavePath, S16, , Save Text File, Text Files (*.txt) if (SavePath != "") { if !InStr(SavePath, ".txt") SavePath .= ".txt" CurrentFilePath := SavePath } } else { SavePath := CurrentFilePath } if (SavePath != "") { FileDelete, %SavePath% FileAppend, %MyEdit%, %SavePath% SplitPath, SavePath, fileName } return ; Open functionality ^o:: FileSelectFile, FilePath, 3, , Open Text File, Text Files (*.txt) if (FilePath != "") { FileRead, FileContent, %FilePath% if (!ErrorLevel) { GuiControl,, MyEdit, %FileContent% } } return ^n::Run, %A_ScriptFullPath% #IfWinActive GuiClose: ExitApp ^Backspace:: send, ^+{left} sleep 50 send, {del} return