Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   if window -ex prob! ne idea (https://simplymaya.com/forum/showthread.php?t=5494)

lalamax3d 29-04-2003 03:07 PM

if window -ex prob! ne idea
 
hi,

i have just seen a video from cgw magzine and they have shown clear code with simple example....

now my maya gives syntax error........... can't find it out.......

can ne one tell.........the prob


here it is:

// declare variables
string $amx_char_vwr = "animex_char_viewer";
string $amx_char_lot = "animex_char_layout";
string $amx_char_lbx = "animex_char_listbox";

// check if window exists already
if ('window -ex $amx_char_vwr')
deleteUI $amx_char_vwr;

// creating new window now
window -w 300 -h 100 -title "ani_chr_vwr" $amx_char_vwr;
frameLayout -l "";


showWindow;

kbrown 30-04-2003 06:40 AM

I didn't test this out but I think your problem is this line:

if ('window -ex $amx_char_vwr')

... which should be:

if (`window -ex $amx_char_vwr`)

Notice the ' vs ` characters...

lalamax3d 30-04-2003 12:26 PM

it works.........
 
hi,

thats gr8.......................exactly................. ...

u da man........

really thnx

take care

bye


All times are GMT. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Simply Maya 2018