LifeAlgorithm / VitalSourcePrinter

Code to legally and automatically print your purchased e-books from VitalSource.com
MIT License
76 stars 24 forks source link

VitalSource reader won't take in pyautogui presses? #9

Open shirish93 opened 7 years ago

shirish93 commented 7 years ago

So it appears that when pyautogui passes keypresses to VitalSource reader, it somehow detects it's a simulated keypress, and doesn't register it. When I create a delayed keypress, the keypress is accepted by all other programs in my computer, except the vitalsource bookshelf/reader. Ideas?

Windows 10
Python 3.4.2 (Winpython)
VitalSource bookshelf 7.5.0

Test code

def test():
    time.sleep(3)
        pyautogui.hotkey('ctrl', 'p')

The above sends in print command to every other program but the bookshelf. I've tried manual ctrl+p and it does work.

LifeAlgorithm commented 7 years ago

Have you tried adding an interval? Like so: pyautogui.hotkey('ctrl', 'p', interval = 0.50)

shirish93 commented 7 years ago

Yup. Didn't work. Thanks for the suggestion!

So, I solved my problem. I had to run the pythons script as administrator.

However, the other problem still exists. Vitalsource has introduced random tabs when doing multiple prints. It throws the program off : - /

noobatcode commented 7 years ago

Which problem did you solve? I am still unable to do a printing