Python Forum
tkinter GUI, problem running seperate files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter GUI, problem running seperate files
#9
(Sep-25-2019, 10:34 AM)Larz60+ Wrote: run and post results

runfile('C:/Users/myuser/.spyder-py3/allinone_test_2.py', wdir='C:/Users/myuser/.spyder-py3')
<class '__main__.StartPage'>: .!frame.!startpage
<class '__main__.PageOne'>: .!frame.!pageone
<class '__main__.PageTwo'>: .!frame.!pagetwo
<class '__main__.PageThree'>: .!frame.!pagethree
<class '__main__.PageFour'>: .!frame.!pagefour
<class '__main__.PageFourSubOne'>: .!frame.!pagefoursubone
<class '__main__.PageFive'>: .!frame.!pagefive
<class '__main__.PageSix'>: .!frame.!pagesix
An exception has occurred, use %tb to see the full traceback.

SystemExit: 0

C:\Users\myuser\AppData\Local\Continuum\miniconda3\Lib\site-packages\IPython\core\interactiveshell.py:3334: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)


###
What I find to be strange is that my program runs error free as long as I run it through my editor Spyder.(Works through PyCharm as well) I had a simpler version using Tkinter but not ttk some time ago that worked just fine, so my (unprofessional) theory is that it's something wrong with Tkinter/my code and not my computer.
I then, and now, add a shortcut to the program.py in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" and bind that shortcut to F8. I checked permissions in Windows and all checks out.
I have several other shortcuts to .py/.pyw files in there that runs from a macro on my mouse, and works perfectly.

One example is "umpriority.pyw - Snarvei"

from pynput.keyboard import Key, Controller as KeyboardController
from pynput.mouse import Button, Controller as MouseController
import time

keyboard = KeyboardController()
mouse = MouseController()

mouse.position = (1135, 628)
mouse.click(Button.left, 1)
time.sleep(0.1)
mouse.position = (1231, 627)
mouse.click(Button.left, 1)
time.sleep(0.6)

keyboard.press(Key.tab)
keyboard.release(Key.tab)
time.sleep(0.5)
for char in "Nødservice POU/COF":
    keyboard.press(char)
    keyboard.release(char)
    time.sleep(0.01)

time.sleep(0.5)

for char in range(9):
    keyboard.press(Key.tab)
    keyboard.release(Key.tab)
    time.sleep(0.05)

for char in "11":
    keyboard.press(char)
    keyboard.release(char)
    time.sleep(0.05)
time.sleep(0.1)

mouse.position = (234, 634)
mouse.click(Button.left, 1)
Reply


Messages In This Thread
RE: tkinter GUI, problem running seperate files - by fishglue - Sep-25-2019, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Help running a loop inside a tkinter frame Konstantin23 3 1,706 Aug-10-2023, 11:41 AM
Last Post: Konstantin23
  Why is the program not running? Is there a logical or syntax problem? behi00 10 2,308 Apr-01-2023, 12:50 AM
Last Post: woooee
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 5,152 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  Python3 tkinter radiobutton problem Nick_tkinter 14 6,326 Feb-15-2021, 11:01 PM
Last Post: Nick_tkinter
  tkinter python button position problem Nick_tkinter 3 3,663 Jan-31-2021, 05:15 AM
Last Post: deanhystad
  [Tkinter] ClockIn/Out tkinter problem Maryan 2 2,301 Oct-12-2020, 03:42 AM
Last Post: joe_momma
  tkinter| listbox.insert problem Maryan 3 3,634 Sep-29-2020, 05:34 PM
Last Post: Yoriz
  Tkinter problem DPaul 6 4,286 May-28-2020, 03:40 PM
Last Post: DPaul
  [Tkinter] Tkinter - I have problem after import varaible or function from aGUI to script johnjh 2 2,652 Apr-17-2020, 08:12 PM
Last Post: johnjh
  [Tkinter] Problem with tkinter when creating .exe file Jan_97 2 4,703 Feb-27-2020, 05:17 PM
Last Post: Jan_97

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020