Code Monkey home page Code Monkey logo

Comments (13)

glitchassassin avatar glitchassassin commented on August 17, 2024

How strange. I'm not immediately sure what's causing this.

What version of Windows are you on? Are you running Python 64bit or 32bit?

from lackey.

glitchassassin avatar glitchassassin commented on August 17, 2024

Also, are you importing lackey first in your script or pywinauto? Does it make a difference if you flip the imports around?

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

I use windows 8 R2, python 32 bit. Now is fine after I reinstall pywinauto. Now I meet another problem, in the last step on itunes, I use lackey to click the menu, the mouse moves very slow. while on other steps it reacts quite fast. I don't know what's the problem.

from lackey.

glitchassassin avatar glitchassassin commented on August 17, 2024

The mouse move is supposed to happen in a constant amount of time (by default 0.3 seconds) regardless of the distance. This results in long mouse moves happening apparently faster than slow ones, even though they take the same amount of absolute time.

Could this be your problem?

(Note that I did discover an issue yesterday where Settings.MoveMouseDelay was not being respected after it was updated - this should be fixed in the development ring, and will be pushed out with the next version.)

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

the mouse actually is at the bottom of the window, I could see that mouse moves slowly to the menu. there should be another click event on the submenu, but often failed because of the slow click event on the menu. I even suppose itunes make the system slower after activating the itunes account, because we I use pywinauto before, it is also very slow(wait ~80s)

from lackey.

glitchassassin avatar glitchassassin commented on August 17, 2024

Is the system less responsive when you move the mouse manually as well at this point, or do you only observe this with simulated mouse movements? Is Sikuli affected, or only pywinauto/lackey?

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

when I manually move the mouse, it moves quite fast. currently I find both pywinauto/lackey are affected. I didn't try sikuli because I don't Jython

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

it is so strange. today I try to use hotkey to get the submenu after activate the itunes with lackey. before activating, the hotkey works fine, after activating not working anymore. so strange.

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

here is the error for the slow click event

[info] Found match for pattern 'C:\Users\Administrator\Desktop\itunes\img/account.png' at (228,77) with confidence (0.977361857891). Target at (257,90)
[action] Clicked at (Location object at (257,90))
[info] Couldn't find 'C:\Users\Administrator\Desktop\itunes\img/menu_signout.png' with enough similarity.

Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Python27\lib\site-packages\keyboard\_generic.py", line 59, in process
    if self.pre_process_event(event):
  File "C:\Python27\lib\site-packages\keyboard\__init__.py", line 117, in pre_process_event
    event.scan_code = to_scan_code(event.name)
  File "C:\Python27\lib\site-packages\keyboard\__init__.py", line 577, in to_scan_code
    scan_code, modifiers = _os_keyboard.map_char(_normalize_name(key))
  File "C:\Python27\lib\site-packages\keyboard\_winkeyboard.py", line 447, in map_char
    raise ValueError('Key name {} is not mapped to any known key.'.format(repr(name)))
ValueError: Key name 'left alt' is not mapped to any known key.

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

hi, not only the mouse move slow, the exits methods is also slow in this window.

if lackey.exists('img/success.png',seconds=30):
    print 'success'

it sometimes takes quite long for image recognition. sometime over 30s.

from lackey.

wangtubs avatar wangtubs commented on August 17, 2024

oh, maybe it is the problem of pywinauto. I use pywinauto to close the client. it often throw an error.

from lackey.

glitchassassin avatar glitchassassin commented on August 17, 2024

It could be the combination of pywinauto and Lackey, I'm not sure. Both access low-level Windows routines, so they might be stepping on each others' toes, so to speak.

That ValueError is perplexing to me. It looks like a bug with keyboard, but I'm not sure where. Can you post the section of your code that causes this error?

from lackey.

glitchassassin avatar glitchassassin commented on August 17, 2024

Closing as not reproducible.

from lackey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.