SetCursorPos is Possible?

On 01/09/2015 at 04:16, xxxxxxxx wrote:


Is Possible, set Cursor Position in Screen?
I have this Python Code, but in Cinema4D not work....

def mousePos(cord) :
    win32api.SetCursorPos((x_pad + cord[0], y_pad + cord[1]))
def get_cords() :
    x,y = win32api.GetCursorPos()
    x = x - x_pad
    y = y - y_pad
    print x,y

On 02/09/2015 at 10:01, xxxxxxxx wrote:


it looks like you are using ActivePython. We (SDK Support Team) have no experience with this and can't support it.
Also I'm not aware of any C4D function to position the cursor.

In general it may also be a bad idea to use Win32 stuff in plugins and scripts. At least, if you are planning to make it public, as it won't work on Mac. But I'm sure you are aware of this.

On 02/09/2015 at 10:31, xxxxxxxx wrote:

@ Runner009
over net, you can find interesting and fun projects for python or extend it
Seems cross-platform tool

example of using:

i use from examples, manual

import c4d  
import pyautogui, pytweening  
def main() :  
  screenWidth, screenHeight = pyautogui.size()  
  currentMouseX, currentMouseY = pyautogui.position()  
  pyautogui.moveTo(500, 500, duration=2, tween = pytweening.easeOutQuad)  
if __name__=='__main__':