title: How can I create a tkinter Python chat app with msg feature?
body: <p>I want to create a Python chat app with <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msg" rel="nofollow noreferrer">msg</a> feature.</p>
  <p>Well, I've been working on this project for a while, and I want to build a messaging app using Python tkinter with <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msg" rel="nofollow noreferrer">msg</a> feature available in any PC.</p>
  <p><strong>The problem is that the code contains some errors.</strong></p>
  <p>Now I will show you the code</p>
  <pre><code>from threading import *
  from tkinter import *
  import os
  
  
  window = Tk()
  window.title(&quot;msg&quot;)
  window.geometry(&quot;350x150+300+100&quot;)
  
  
  txtYourMessage = Entry(window, width=50)
  txtYourMessage.insert(0,&quot;&quot;)
  txtYourMessage.grid(row=1, column=0, padx=10, pady=10)
  
  server = Entry(window, width=50)
  server.insert(0,&quot;&quot;)
  server.grid(row=2, column=0, padx=10, pady=10)
  
  
  def Message():
      os.system(&quot;msg * /server:%server% %txtYourMessage%&quot;)
  
  btnSendMessage = Button(window, text=&quot;Send&quot;, width=20, command=Message)
  btnSendMessage.grid(row=3, column=0, padx=10, pady=10)
  
  window.mainloop()
  </code></pre>
  <p><strong>When I run the code, the code actually works but it doesn't send the message you wrote, I think the problem is in this part</strong></p>
  <pre><code>txtYourMessage = Entry(window, width=50)
  txtYourMessage.insert(0,&quot;&quot;)
  txtYourMessage.grid(row=1, column=0, padx=10, pady=10)
  
  server = Entry(window, width=50)
  server.insert(0,&quot;&quot;)
  server.grid(row=2, column=0, padx=10, pady=10)
  
  
  def Message():
      os.system(&quot;msg * /server:%server% %txtYourMessage%&quot;)
  </code></pre>