If you've already got pywin32 installed, you just need to make sure it's on your PYTHONPATH/sys.path in Nuke. The skeleton code I found to create a shortcut:

import win32com.client

shell = win32com.client.Dispatch("WScript.Shell")
shortcut = shell.CreateShortCut("t:\\test.lnk")
shortcut.Targetpath = "t:\\ftemp"
shortcut.save()


Another discussion mentions the following: "See \win32comext\shell\test\link.py [in the pywin32 distribution] for a small class that wraps the required interfaces."

-Nathan


-----Original Message----- From: Vincent Langer
Sent: Friday, February 01, 2013 2:06 AM
To: nuke-python@support.thefoundry.co.uk
Subject: [Nuke-python] Re: Use Nuke to create windows folder shortcuts

Hi Nathan,

I think pywin32 is installed on my machine and on every machine on the farm.

But how can i access pywin32 within nuke??
do i have to copy some libs?

or do i have to execute another external py script from nuke?


another idea: would it be possible to let nuke execute a .bat file
which creates a link-folder?

but i do not know if it is possible with a small .bat script.

sorry for that many questions but i really would like to know :)

thanks and cheers,
Vincent





<< You either need to use ctypes to grab the Windows function needed
(which I     << haven?t ever tried), or you need to install pywin32.
<<
<< -Nathan

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to