Hye all.
I have a gui program. My question is how can i make my program started with user insert his name first. For example: when the user double click on my program, then there will be a popup message ask the user his name. After the user insert his name, then only the program will run. Can anyone help me on this?
You can use the following code to do what you want, just put it at the beginning of the file. This will ask for a name as woodchips suggests, when it is empty or cancel is clicked, the dialog will reappear until a non-empty name is given.
However, if all you need is the user name (i.e. account name) of your user, you can do this automatically without any user intervention:
In Unix/Linux and probably Mac you should be able to probe this a little more by using the finger program (when present on your system). Take a look at the manpage of finger and the matlab command system for more information.