atbswp icon indicating copy to clipboard operation
atbswp copied to clipboard

Speed replay

Open jetpack001 opened this issue 5 years ago • 14 comments
trafficstars

Checklist

  • [x ] I use the latest release of atbswp
  • [x ] The issue is not existing yet

Verbose log

PASTE VERBOSE LOG HERE

Miscellaneous information

Operating System

Ubuntu 18.04

Desktop Environment/Window Manager

Gnome 3.28

Python version

Write here

Description

Everything works fine but i can't find out how to replay the capture at the same speed as i record, not faster.

jetpack001 avatar Nov 08 '20 18:11 jetpack001

Can give more details? What do you feel is faster: the mouse or the keyboard?

RMPR avatar Nov 11 '20 11:11 RMPR

mouse, i use it for a game and every click has to be precise at a certain time but when it clicks its too fast and rutine fails

jetpack001 avatar Nov 12 '20 21:11 jetpack001

Turns out the granularity is something I defined as a constant in the code. in the next update I'll expose that setting to users. If you don't want to wait, you can modify in the source code directly. Relevant line https://github.com/RMPR/atbswp/blob/97be7406040eec44607dbea2d2518e4fb0e20562/atbswp/control.py#L121

RMPR avatar Nov 13 '20 01:11 RMPR

found the line but i don't know what value should i put to be fine, kinda newbie into that.

jetpack001 avatar Nov 13 '20 20:11 jetpack001

To be honest, me neither. I guess you can find the value that suits you the most by experimenting. That's also why I want to expose this setting to end-users. For your use case, you may want lower values though.

RMPR avatar Nov 13 '20 22:11 RMPR

ok, ill try. thank you

jetpack001 avatar Nov 14 '20 18:11 jetpack001

Piggybacking off this, where would be the best place to write delays between key presses? I'm also trying to record exact timings.

whoyawn avatar Jan 29 '21 01:01 whoyawn

If I understand correctly you have a delay problem but with the keyboard instead of the mouse?

RMPR avatar Jan 30 '21 00:01 RMPR

Yes, that is correct. Currently, each keypress has a consistent delay in between and I'm trying to find a way to record the exact time in between them.

whoyawn avatar Jan 30 '21 01:01 whoyawn

Okay, please create a new issue for this, feel free to add any other detail you might find relevant.

RMPR avatar Jan 31 '21 14:01 RMPR

Hello RMPR, First excellent work,

Second i have a question, I want to make the playback faster, the mouse and keyboard, can you suggest me how to do it?

I undestand that in control play i have to change the value of the next line to have a faster mouse playback and the keyboard?

control.py Line 121 in self.mouse_sensibility = 21

Thanks in advance for your advice, Have a nice day, Paola.

paomontes avatar Feb 14 '22 04:02 paomontes

I undestand that in control play i have to change the value of the next line to have a faster mouse playback and the keyboard?

control.py Line 121 in self.mouse_sensibility = 21

increasing this value will make you have a faster mouse playback, for the keyboard it's a bit more complicated than that. If you don't want to fiddle with the code just for that, you can create an issue to expose this setting to end-users, I'll have a look when I'll have more bandwidth.

RMPR avatar Feb 15 '22 11:02 RMPR

I changed the timeout = int(b - self.last_time) lines to cast to float() instead, as well as adding a pyautogui.PAUSE = 0 line after imports. Not perfect (I suspect due to some minor inaccuracies with Python's sleep function) but much more accurate in regards to recording proper delays between actions.

scainburger avatar Mar 07 '22 15:03 scainburger

Seems like a good idea, I can definitely accept a PR about this.

RMPR avatar Mar 08 '22 10:03 RMPR