Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature request) Configurable keypress time for ACT plugin #5

Open
icy- opened this issue Dec 4, 2021 · 10 comments
Open

(feature request) Configurable keypress time for ACT plugin #5

icy- opened this issue Dec 4, 2021 · 10 comments

Comments

@icy-
Copy link

icy- commented Dec 4, 2021

Hi, it seems to be working with quick tests in EW, but wondering if you could make it configurable keypress time?

The press time seems too short -- every two minutes, as per NextKeyPress = Native.GetTickCount64() + 2 * 60 * 1000;

Would be great if something closer to 10 or 15 or even 20minutes -- if it could pull from a settings area or so!
thanks!

@icy-
Copy link
Author

icy- commented Dec 4, 2021

Kinda different one , but I suspect even if the player returns, the queued keypress will still happen. So if player returns and spams, for example, "F" , then eventually "Ctrl+F" might happen and do unwanted behavior.

@Limiana
Copy link
Collaborator

Limiana commented Dec 4, 2021

Hi, well, 2 minutes are that so also it works in dungeons to prevent kick in 10 minutes. Also it's not 4 or 5 minutes to make sure that even in the event that game couldn't register keypress due to lag spike for example it's not a problem. But of course, I can add configuration option, no problem here. Just I recommend setting it that in 30 minutes it would click at least 3 times.

As for another one... this shouldn't happen. I specifically check if application is not an active window or if an user is actually afk right before sending a keypress:

if(Native.GetForegroundWindow() != handle || Native.IdleTimeFinder.GetIdleTime() > 60 * 1000)

The only situation where I can see it happening is if you left game window open and went afk, returned and program has send keypress down event into game and now waiting 200 ms to send keypress up event, and just so happened that you returned and started pressing keys in this 200 ms window... but that should be extremely unlikely event and well, I don't think there is a good solution to it anyway. But once you returned to the game and playing it, there should be no key presses at all. Or is this incorrect and they still happen? In this case, further diagnostics is required.

@icy-
Copy link
Author

icy- commented Dec 4, 2021

Yeah I have some anecdotal evidence, no formal test yet.
image

Made this test just now on

FileName: C:\Users\icy\AppData\Roaming\Advanced Combat Tracker\Plugins\AntiAfkKick.dll
OriginalFilename: AntiAfkKick-ACT.dll
FileVersion: 2.0.0.0
ProductVersion: 2.0.0.0
FileDescription: AntiAfkKick_ACT.Properties
ProductName: AntiAfkKick_ACT.Properties
LegalCopyright: Copyright © https://github.com/Eternita-S 2021```
 

@Limiana
Copy link
Collaborator

Limiana commented Dec 4, 2021

Well if it happens when game is inactive then it's fine and by design, but since you aren't currently in game it shouldn't cause any problems at all.
That is unless you're using some other automated clicking software in which cause there could be interference. Though, in that case, another clicking software would be already doing the job of antiafkkick by itself.
Do you use any of that software?

@icy-
Copy link
Author

icy- commented Dec 4, 2021

ah, I see what you mean! If I stay active for a minute after coming back, the scheduled one doesn't take place. I see what you mean now =)
I'm not using anything else no, was just trying to confirm! Thanks!

@queuecry
Copy link

queuecry commented Dec 17, 2021

How exactly do you get this Plugin to consistantly work? I got it to work yesterday thankfully for work, but can't most the time. Like do you have to be in keyboard mode? Does the program have to be on screen? I've only got it to work properly once. There must be something im doing wrong.

@Limiana
Copy link
Collaborator

Limiana commented Dec 17, 2021

@queuecry are you using Dalamud version or Act/Standalone version?

@queuecry
Copy link

the act one

@Limiana
Copy link
Collaborator

Limiana commented Dec 17, 2021

Very likely you have a problematic device attached to your PC that is keeping sending events to it, preventing recognition of idle state. Download InputDebugger.exe from this link: https://github.com/xaviergmail/DiscordNotificationDebug/releases/tag/v1.1 launch it and see if it will recognize that your system is idle when you're not doing anything.

@queuecry
Copy link

ok ill try it! thank! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants