cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-583825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EScriptiing%3A%20denominazione%20e%20chiusura%20dei%20diari%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-583825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20uno%20script%20che%20tenta%20di%20salvare%20una%20tabella%20di%20dati%20in%20un%20diario%20e%20quindi%20dal%20diario%20la%20tabella%20di%20dati%20viene%20salvata%20in%20un%20documento%20MS%20Word.%20Una%20preferenza%20consiste%20nell'eseguire%20la%20parte%20Journal%20in%20background.%20Tra%20gli%20script%20funziona%20solo%20la%20parte%20Save%20MSWord%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPer%20nominare%20la%20rivista%3A%3C%2FP%3E%3CP%3EImposta%20nome%20non%20funziona.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPer%20nascondere%20il%20Diario%20sullo%20sfondo%3A%3C%2FP%3E%3CP%3EN%C3%A9%20(Invisible)%20n%C3%A9%20Close%20()%20funzionano.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20current%20datatable%20()%3B%0A%0Adt2%20%3D%20dt%20%26lt%3B%26lt%3B%20Journal%20(invisible)%3B%0A%3CBR%20%2F%3Edt2%20%26lt%3B%26lt%3B%20set%20name%20(%22test1%22)%3B%3CBR%20%2F%3E%0Adt2%20%26lt%3B%26lt%3B%20Save%20MSWord(%20%22%24Desktop%2Fjmp_example.doc%22%20)%3B%0A%20%0A%20close%20(dt2)%3B%0A%20%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-583825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EScripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-583833%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptiing-%20Assegnare%20un%20nome%20e%20chiudere%20i%20diari%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-583833%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EUsa%20i%20comandi%20che%20puoi%20usare%20per%20le%20finestre%2C%20%26lt%3B%3CMOSTRA%20finestra%3D%22%22%20e%3D%22%22%3E%26lt%3B%3CIMPOSTA%20titolo%3D%22%22%20finestra%3D%22%22%3E%3C%2FIMPOSTA%3E%3C%2FMOSTRA%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FBig%20Class.jmp%22)%3B%0A%0Adt2%20%3D%20dt%20%26lt%3B%26lt%3B%20Journal%3B%0Adt2%20%26lt%3B%26lt%3B%20Show%20Window(0)%3B%0Adt2%20%26lt%3B%26lt%3B%20Set%20Window%20Title(%22test1%22)%3B%0A%0Adt2%20%26lt%3B%26lt%3B%20Save%20MSWord(%22%24DESKTOP%2Fjmp_example.doc%22)%3B%0A%0Adt2%20%26lt%3B%26lt%3B%20Close%20Window%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%26nbsp%3B%3C%2FCODE%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_0-1671551853358.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1671551853358.png%22%20style%3D%22width%3A%20148px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1671551853358.png%22%20style%3D%22width%3A%20148px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F48517i0E857C16A1B75647%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1671551853358.png%22%20alt%3D%22jthi_0-1671551853358.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
GroupSquareWolf
Level III

Scriptiing- Naming and closing Journals

Here is a script trying to save a data table in a Journal and then from the Journal the data table is saved into a MS word document. One preference is to run the Journal part in the background. Among the scripts, only the Save MSWord part works

 

To name the Journal:

Set Name is not working.

 

To hide the Journal in the background:

Neither (Invisible) nor Close () is working.

 

Thank you for your help!

 

dt = current datatable ();

dt2 = dt << Journal (invisible);

dt2 << set name ("test1");
dt2 << Save MSWord( "$Desktop/jmp_example.doc" ); close (dt2);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Scriptiing- Naming and closing Journals

Use commands you can use for windows, << Show Window and << Set Window Title

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt2 = dt << Journal;
dt2 << Show Window(0);
dt2 << Set Window Title("test1");

dt2 << Save MSWord("$DESKTOP/jmp_example.doc");

dt2 << Close Window;

 

jthi_0-1671551853358.png

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Scriptiing- Naming and closing Journals

Use commands you can use for windows, << Show Window and << Set Window Title

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt2 = dt << Journal;
dt2 << Show Window(0);
dt2 << Set Window Title("test1");

dt2 << Save MSWord("$DESKTOP/jmp_example.doc");

dt2 << Close Window;

 

jthi_0-1671551853358.png

 

-Jarmo

Recommended Articles