0

I'm trying to figure out a way to get the script editors output to write to a textField control in Maya for a custom-made window. Essentially, I'm trying to rewrite the commandline function without having the separator or input options.

I'm having a bit of difficulty figuring out what to do, since there seems to be not clear information in Maya's documentation - can I get a few pointers in the right direction?

SirJames
  • 387
  • 8
  • 27
  • Alright, I figured out my fix. Essentially, I went to userPrefs.mel and found out that I can edit variables for things like the "commandLine" function, which allows me to get exactly what I was looking for. If you set the "commandLifeInputFieldWidth" variable to "0", it only displays output. – SirJames Apr 06 '16 at 15:20

1 Answers1

3

the cmdScrollFieldReporter and cmdScrollFieldExecuter controls do most of the work for creating the script listener -- see if those do what you need before trying to invent something new.

theodox
  • 12,028
  • 3
  • 23
  • 36
  • Theodox, turns out that even though that function worked the way I needed it to, the output provided too much information. To the point that even the executed script displayed in the scrollField. Querying the output didn't seem to work either. I'm only interested in getting the output - I.E. print "hello world"; //returns this text only, in the scrollfield; //hello world – SirJames Apr 06 '16 at 14:57
  • Alright, I figured out my fix. Essentially, I went to userPrefs.mel and found out that I can edit variables for things like the "commandLine" function, which allows me to get exactly what I was looking for. If you set the "commandLifeInputFieldWidth" variable to "0", it only displays output. – SirJames Apr 06 '16 at 15:20
  • You can also use `scriptEditorInfo` to control the verbosity of the listener a little bit – theodox Apr 06 '16 at 21:13