Home Coding, Scripting, Shaders

How to get the input from commline control?

Hello guys,

I have two buttons and one commandLine.
What I want is, assign the input value of commandLine to a variable, and take a return value from function as the display of the commandLine’s output.
For the output part, i know MGlobal.displayInfo can achieve this. But how to deal the input part? Because the return value of the commandLine is the string name path, not the input value.
If I simply use a = cmds.commandLine(…), it will give a wrong result.
Much appreciate if anyone can give suggestions! Or if you have any other way to achieve my this, like textfield?


Replies

  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    You can't.
    This is a limitation with the commandLine UI control - it has no value flag and thus you can't read or write a value from/to it. The return you get from executing the commandLine -command is the long name of the control itself - not its' value.

    What exactly is it that you are trying to achieve here? Why are you using this control in the first place?
Sign In or Register to comment.