Sep-25-2019, 12:06 PM
(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)