# Calling A Proc From In A Flag

**URL:** https://forum.highend3d.com/t/calling-a-proc-from-in-a-flag/2773
**Category:** Maya
**Tags:** mel
**Created:** [October 3, 2006, 5:23pm UTC](https://forum.highend3d.com/t/calling-a-proc-from-in-a-flag/2773 "2006-10-03T17:23:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jda](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@jda](https://forum.highend3d.com/u/jda)
#### Post date: [October 3, 2006, 5:23pm UTC](https://forum.highend3d.com/t/calling-a-proc-from-in-a-flag/2773/1 "2006-10-03T17:23:38Z")

</div>

I was wondering if any one might know what I am doing wrong here or if this is even possible. I am trying to call the testFilePath proc in the -image flag for picture. It runs but does not put the return string into the -image flag.

proc string testFilePath( string $name ) {  
string $xtest = ("C:/testdirectory/"+$name);  
return $xtest;  
print ($xtest+"\n");  
}  
window testwin;  
columnLayout;  
string $testpic = `picture -image testFilePath("test.bmp")`;  
showWindow testwin;

I know I can stick the result from testFilePath into its own var then just call it at the -image flag, but I would rather not. The interface I am building is very art intensive and it would be a pain to declare each piece of art.

Thanks in advance,  
JDA

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [October 3, 2006, 5:30pm UTC](https://forum.highend3d.com/t/calling-a-proc-from-in-a-flag/2773/2 "2006-10-03T17:30:27Z")

</div>

try:

string $testpic = `picture -image (testFilePath("test.bmp"))`;

---

<div class="post-metadata">

### Author: ![jda](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@jda](https://forum.highend3d.com/u/jda)
#### Post date: [October 3, 2006, 10:42pm UTC](https://forum.highend3d.com/t/calling-a-proc-from-in-a-flag/2773/3 "2006-10-03T22:42:59Z")

</div>

Got it! Thanks! I could have sworn I had tried that one but apparently I did not.  
Thanks again,  
JDA
