From 389083ea72af5ddda03e7058be8314c35ffa1802 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Sun, 22 Aug 2021 13:08:17 +0300 Subject: [PATCH] Release 1.1 Auto notepad opened --- GTAwhatToBuy/GTAwhatToBuy.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/GTAwhatToBuy/GTAwhatToBuy.py b/GTAwhatToBuy/GTAwhatToBuy.py index 0c52b10..8e11f85 100644 --- a/GTAwhatToBuy/GTAwhatToBuy.py +++ b/GTAwhatToBuy/GTAwhatToBuy.py @@ -1,5 +1,6 @@ -import json, os, shutil +import json, os, shutil, subprocess import curses +import sys os.system("title " + "GTA BuyBase") @@ -557,12 +558,18 @@ while True: json.dump(owningtempbase, ownwrite, indent=3, ensure_ascii=False) print() - print("File is created. Open it with any text editor") + print("File is created. Open it with any text editor (notepad will be opened automatically on Windows)") print("If you own item, type true near its name. If not - false") print("It shold be like this: ") print('"Avenger": true,') print("After each line shold be a ','") print() + if sys.platform == "win32": + input("After you press Enter, notepad app will be opened") + command = 'cmd /c "notepad.exe {}"'.format(ownbasename) + os.system(command) + + print() input("When you are ready, press Enter") input("Press Enter to load data from ownbase file")