-
Notifications
You must be signed in to change notification settings - Fork 301
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
Change sleep times to follow core functions (for sendwhatmsg_instantly
function)
#147
base: master
Are you sure you want to change the base?
Conversation
@dzonimn Thanks for pointing it out but can you explain how it does not work as you said it does not click on the box but it should not even click. With Regards and Thanks |
If I understood the code correctly, the following code opens a web browser with the intended Lines 28 to 32 in efd2ecf
With The L31 change was mostly just following how the normal |
@dzonimn You are awesome it was a bug that we shipped early but we did not notice in that function you need to comment that line out to make it work.So please remove it to make it work and then commit it. |
@codewithpom I removed the lines involving sleep and click. By doing that, it works fine now! Thanks! (I'm guessing that the click removed the focus from the message box and so the enter command wouldn't do anything. However, I'm still not sure how the non-instant functions worked at here) PyWhatKit/pywhatkit/core/core.py Lines 62 to 72 in 1447f5a
|
Hey @dzonimn, thanks for submitting the fix. Can you confirm that is the function working for you after removing those lines. Make sure you don't use your mouse or keyboard while the function is running. |
Hey @aaryanrr I can confirm that it works on my side after I removed those lines. |
Thanks for the response. I have tried doing it on Ubuntu LTS but it isn't working there and we need to ensure cross platform support. I'll ask other maintainers to test this. |
@aaryanrr I could also try to test out on my Linux machine. I don't really have any idea why it wouldn't work as the methods seem to implement the same logic, with the instant version not including any clicks |
It would be great if you can try it out on your system. |
@dzonimn Is there any update on this PR? |
Hi, I haven't been very free unfortunately but the last discovery I think I stumbled across was that it was fine on Linux, and back on Windows, there was at least one other function that had a similar problem sending (it might have been screenshot sending). It would be helpful if someone could also check. |
No problem, take your time. I'll check it on windows. |
Hi, I was recently trying to use this library but found that the instant version of the
sendwhatmsg
function didn't seem to work.It would type in the message in the text box, but it didn't seem to click into the text box before pressing enter. The original functions worked, so after some digging into how the original functions did it, I noticed that there were a difference in
sleep
times. Adjusting the instant function with the non-instant function led to the instant function working as expected.On a different note, in my gut feeling, I feel like this part of the code seems like code that should exist in the core file, but I can't say I'm too familiar with the codebase to go refactoring things in a big way right now.
Do let me know if I should provide more information. Keep up the good work! :)