Category Archives: Windows
Python emulate mouse click in Windows
The following bit of code, which requires the win32api, simulates a mouse click using Python under the Windows OS. import win32api, win32con def click(x,y): 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(100, 100) # simulate mouse … Continue reading
Windows Batch FTP Routine
Here is some example code to connect to an FTP server and run the commands that follow. @echo on %windir%\system32\ftp.exe -n -s:”%~f0″ server.com goto done user myusername mypassword cd /home/directory/public_html ls -al quit :done pause The key to this working … Continue reading
Python Print Screen and Save Image in Windows
So you need to do a “Print Screen” and save the image in the clipboard huh? I had that exact need too. Let me save you a few hours of trouble and tell you that the win32clipboard does not yet … Continue reading
