Jump to content

Python Winerror1400

I have created a pretty simple python script, but have come across an error on line 10(code below).  Here is the documentation for the header I am using, in case you need it https://pyautogui.readthedocs.org/en/latest/ .  Basically, when i use the click function on a link i get this error.

Traceback (most recent call last):

  File "D:/Documents/CraigslistMaker/CraigslistMaker.py", line 10, in <module>
    pyautogui.click(x=648, y=145, clicks=1, interval=0.2, button='left') #click on post to classified
  File "C:\Users\littl_000\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pyautogui\__init__.py", line 362, in click
    platformModule._click(x, y, 'left')
  File "C:\Users\littl_000\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pyautogui\_pyautogui_win.py", line 437, in _click
    _sendMouseEvent(MOUSEEVENTF_LEFTCLICK, x, y)
  File "C:\Users\littl_000\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pyautogui\_pyautogui_win.py", line 480, in _sendMouseEvent
    raise ctypes.WinError()
OSError: [WinError 1400] Invalid window handle.
 
Process finished with exit code 1.
I don't know what is causing this, the click function works fine on other stuff, just not links.  Ideas?
__author__ = 'littl_000'import pyautoguiimport timepyautogui.click(x=377, y=34, clicks=3, interval=0.2, button='left') #Highlight url bartime.sleep(1)pyautogui.typewrite('craigslist.com') #type craigslist.com in the url barpyautogui.hotkey('enter') #go to craigslisttime.sleep(3)pyautogui.click(x=648, y=145, clicks=1, interval=0.2, button='left') #click on post to classifiedtime.sleep(3)pyautogui.click(x=521, y=509, clicks=1, interval=0.2, button='left') #click on service offeredtime.sleep(2)pyautogui.click(x=519, y=231, clicks=1, interval=0.2, button='left') #click on computer services

 

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×