Open dgleba opened 2 years ago
To clarify, you are hitting a hotkey and you want it do do something, say put in the date?
Yes, I am hitting ctrl - /
.
It is supposed to enter el0 n 123. 12345
in the gedit screen or whatever screen accepts text, but it opens a new window sometimes. It seems like it does that if I hold the ctrl
key too long.
Once I got it all working with el0 n 123. 12345
or other test text, I want to graduate to entering the date-time, etc.
Hi @dgleba!
I hope you are doing well. We Need more code as an example to understand what you are trying to do.
Is this what you are saying?
import pyautogui
import time
pyautogui.hotkey('ctrl', '/')
time.sleep(0.3)
pyautogui.write("el0 n 123. 12345", interval=0.005)
time.sleep(0.3)
pyautogui.hotkey('enter')
time.sleep(0.3)
# pyautogui.hotkey('return')
Just dont try doing this pyautogui.hotkey('ctrl', 'el0 n 123. 12345')
it doesn't work that way.
There are too many ways to program for, and no direct answer.
Depending on the different
Needless to say there are a number of ways this can be hiccuped... It is just tackling one at a time.
If I should not be asking this here, please tell me and I will post where you suggest. I am just getting started with this package.
Hello pyautogui people:
In Pop!_os 21.10 I created a keyboard shortcut in the settings panel
'ctrl'-'/'
to runpython3 /home/dg/scuts/p2-pyautogui.py
In
/home/dg/scuts/p2-pyautogui.py
I used the following:In gedit, If I hold down the control key too long, it seems to execute
'ctrl'-'n'
and open a new gedit window. Sometimes I get the emoticon input window, which I think is'ctrl'-'.'
I want to make it more mistake-proof for entering text like date-time for example using a hotkey combination.
What am I doing wrong?