Explaining Filebrowserdialog

Hello,

Is any way of using fileBrowserDialog command inside a variable, so i can call it when pressing a button?

CODE
string $getImage = fileBrowserDialog -m 0 -ds 1 -fc "importImage" -ft "image"-an "Import\_Image" -om "Import";

window main;
columnLayout;
button -l "Browse" -c $getImage;
showWindow main;

In that case the dialog is appearing first and then the window

and if is type the whole command inside the button command flag i got this error:

Too many arguments. Expected 1, found 2.

Thanks!

Borja

[codebox]string $getImage = "fileBrowserDialog -m 0 -ds 1 -fc \"importImage\" -ft \"image\"-an \"Import_Image\" -om \"Import\"";

window main;
columnLayout;
button -l "Browse" -c $getImage;
showWindow main;[/codebox]

Hi mduvekot.

Thanks for correcting the code.

Just one more question. Why this command doesn't work with the back quotes typing like :sphere -r 2 -n "ball";?

Thanks again!