I'm getting this error
C:\Users\Rayner\Desktop>python try.py Traceback (most recent call last): File "try.py", line 1, in from pythonwin import pywin ImportError: No module named pythonwin
when running this code
from pythonwin import pywin
import win64api, win64con, time
import math
def click(pos):
x, y = pos
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
click((150, 1000))
## clicks on google chrome on the taskbar to get out of IDLE
r = 303 ## radius (largest that will fit)
## this is the center of the circle
x1 = 500
y1 = 390
## number of dots (minus 1)
n = 3000
time.sleep(1) ## waits for chrome window to open
theta = 0
for i in range(n): ## basic circle drawing algorithm
theta += 2*math.pi/n
x = round(math.cos(theta)*r)
y = round(math.sin(theta)*r)
click((x+x1, y+y1))
pywin32
? – furaspythonwin
if you don't use it in code ? – furaswin64api
,win64con
but later you usewin32api
,win32con
. – furas