Hello, I am new to Python and can’t see my mistake in the code. I hope someone can help me out.
The Idea:
I want to create a Interface to manage clients by creating a “clientname.txt” file and store the name itself and a 3 digits clienttag on the next txt line in it (thats only one part of the whole concept).
Done:
I created a GUI with the QT Designer and saved it as *.ui. This part of the GUI consists of two textfields and a “create” button.
Now:
I want to access to the GUI and use it to create a new client.
Here is the code snippet for the file creation:
def createTxtFile():
print "do something!"
createNewClientTextField = cmds.textField("createProject_CreateNewClientTextBox", q=True, text=True )
pathTxtFile = file(pathToSaveClientFile + "%s.txt" %(selectionName),"w" )
selectionName= cmds.textField("createProject_CreateNewClientTextBox", edit=True, text="text")
cmds.button("createProject_CreateNewClientButton", edit=True, command="createTxtFile()")
After executing the code I got a file called “createProject_CreateNewClientButton”
All I need is a hint to get the filename…
Thank you in advance!