0

I'm trying to figure out if i can read and write to an exe file, iv'e learnt from my mistake of not providing enough information so in this post i'm going to try and describe and give as much information as possible.

First off i need to clarify what kind of file im trying to read data from. The file is an exe file made with C++ by Mojang, the software can be downloaded from - https://www.minecraft.net/en-us/download/server/bedrock

This is what the interface looks like

What i'm trying to do is run the exe file as a sub process, take the information from the exe file and put it in a label in tkinter that constantly updates, and have a way to communicate with the exe file through an entry in tkinter to execute onboard commands and functions embedded into the exe file. Attached is an image of my interface and where i want the layout to be.

import tkinter as tk

HEIGHT = 1080
WIDTH = 1920
FRAMECOLOR = '#80c1ff'
root = tk.Tk()

canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH)
canvas.pack()

frame = tk.Frame(root, bg=FRAMECOLOR, bd=5)
frame.place(relx=0.35, rely=0.8, relwidth=0.5, relheight=0.1, anchor='n')

lower_frame = tk.Frame(root, bg=FRAMECOLOR, bd=10)
lower_frame.place(relx=0.35, rely=0.1, relwidth=0.5, relheight=0.67, anchor='n')

button_frame = tk.Frame(root, bg=FRAMECOLOR, bd=10)
button_frame.place(relx=0.75, rely=0.1, relwidth = 0.25, relheight=0.8, anchor='n')

entry = tk.Entry(frame, font=40)
entry.place(relwidth=1, relheight=1)

button1 = tk.Button(button_frame, text="Test Button", font=40)
button1.place(relx=0.001, rely=0, relwidth=0.5, relheight=0.1)

label = tk.Label(lower_frame)
label.place(relwidth=1, relheight=1)

root.mainloop()

The Layout

Currently this is all the information i can supply. I think i need to say that i am very new to coding so any explanation with answers will be much appreciated.

Thank You - Connor

  • what data are you trying to get from an exe file? as in text ? – coderoftheday Oct 02 '20 at 17:45
  • @coderoftheday yes im trying to get text, sort of like a log file. The only problem is that the log file that comes with this software only displays the text after you stop running the software. Basically i need the text to continuously update so if something was to go wrong with the software i would know. – Connor-Gold Oct 02 '20 at 23:35
  • You asked a similar question the other day... https://stackoverflow.com/questions/64151718/is-there-a-way-to-read-the-contents-of-a-exe-file-and-write-it-into-a-label-in-t – scotty3785 Oct 07 '20 at 12:17

0 Answers0