Copy and paste text from MaxScript Listener in a .Txt

Hello! I have a small question to do all of you:

With a little script, I have a button that find the position of an object.
In Listener I see write the position es. pos: [66.4655,8.38055,0].

Now, how do I transfer the result of the listener to a text file and open it after pressing the button?

Action: Press button > open .txt (not listener) with the result print.

Thanks and I hope in your help!!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Michele71's picture

Guys, I can't

Guys, I can't understand.
The suggestion that Marco is great, but I need a step back... See attachment

AttachmentSize
Test.gif 44.14 KB
Michele71's picture

Grazie Marco! Now try your

Grazie Marco! Now try your suggestion... I hope that is the right way ;)

Marco Brunetta's picture

Check out "FileStream

Check out "FileStream Values" in the reference for ways to open/edit/write text files in maxscript. And go to "Executing External Commands and Programs" for ways to...well... execute external commands and programs...=p

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.