Thanks!
//img=Open("$SAMPLE_IMAGES/tile.jpg"); pp= Current Window(); na=pp << Window Class Name();//??
名= Get Window List() << Get Window Title();i=1;For(i=1,i<=NItems(名),i++,aa=名[i];if(right(aa,3)=="jpg"|right(aa,3)=="png",pp=left(aa,length(aa)-4);Break()));
I am not sure what you mean when you specify "an image". Is this a displayed data table window? Or is it the output from JMP Platform? Or is it an actual image display of a .jpg or .png file?
<< Get Path will give you the full file name of the data table.
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); path = dt << Get Path(); Show( path );
<< Get Datatable will return the name of the data table associated with the Display Output from a JMP Platform.
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Distribution( Column( :Age, :Weight ) ); t = obj << Get Datatable; Show( N Rows( t ) );
Thank Jim!
I just get the picture window title like this JSL
Open( "$SAMPLE_IMAGES/tile.jpg" ); pp = Current Window(); na = pp << Window Class Name();//??
OK
You know the name of the image if you are opening it -> get it from the filename/path. There isn't a window when you use Open() on image, it will just return the image object (at least doesn't seem to create a window in JMP17/JMP18 when run from script editor).
But you can send << Get Path to that
Names Default To Here(1); img = Open("$SAMPLE_IMAGES/windmap.png", "png"); //Show(Get Window List() << get window title, img << Get Path); nw = New Window(img << Get Path, img );
And if you have already open windows, Get Window List() << Get Window Title works but you might not know which is your image (last opened window is the last in list).
I opened the png file with JMP by default, so I need to get the name this way.