Because getDirectories returns an array, you'd get the first element and then add the file name afterwards: out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop"))[1] + "test.txt"
Still I have no idea how maxscript can save it to desktop, Im trying to add /text.txt to end of line but still get error out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop/text.txt")) out_file = createfile out_name for curObj in (selection as array) do (format "Name:% \n" curObj.name…
"$.name" doesn't know what to do because you're not specifying what objects name to get. You need to loop through the objects and get all their names, like such: out_name = ((GetDir #export)+"/test.txt")out_file = createfile out_namefor curObj in (selection as array) do (format "Name:% \n" curObj.name to:out_file)close…
Thank you for your help, script work well now. out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop"))[1] + "test.txt" out_file = createfile out_name for curObj in (selection as array) do (format "% \n X:%" curObj.name curObj.pos.controller[1].value to:out_file) close out_file I want to export…
For that, you could loop through the values individual characters as a string and replace the periods with commas; out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop"))[1] + "test.txt"out_file = createfile out_namefor curObj in (selection as array) do ( posX = (curObj.pos.x) as string for i=1…