On 01/02/2017 at 00:59, xxxxxxxx wrote:
As a workaround I coded an small application in autoit (windows only but it's not important since mac os FileDialog don't have a filename field).
So basicly my autoit code wait a specific windows. And when it find it it write the argument into the name field.
It's not the proper way but it's working.
Here my autoit code -you can find information about compiling and more here => https://www.autoitscript.com/site/autoit/
AutoItSetOption("SendKeyDelay",0)
AutoItSetOption("SendKeyDownDelay",0)
;#Wait 100000s a windows named Texture Manager Replace
If WinWait("My unique UI name Replacer", "", 100000) Then
;Send arguments to this windows in EDIT1 field (fieldname)
ControlSend("Texture Manager Replace", "", "Edit1", $CmdLineRaw)
EndIf
And here my python I used subprocess since c4d.storage.GeExecute don't seem to allow arguments
import subprocess
import platform
if platform.system() == "Windows":
dir, file = os.path.split(__file__)
subprocess.Popen([os.path.join(dir, "writter.exe"), "text to fill"])
new_file = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_IMAGES, "My unique UI name Replacer", c4d.FILESELECT_LOAD)