cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-750422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EScriptBox-Scrollen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-750422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHallo%2C%20ich%20m%C3%B6chte%20die%20folgende%20Skriptbox%20gerne%20bis%20zum%20Ende%20scrollen%20lassen%2C%20so%20dass%20immer%20der%20zuletzt%20geschriebene%20String%20sichtbar%20ist.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CDIV%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ew%3Dnew%20window(%22a%22%2C%20sb%3Dscript%20box())%3B%0A%0Afor%20(i%3D1%2C%20i%26lt%3B%3D100%2C%20i%2B%2B%2C%0A%09%09sb%26lt%3B%3CAPPEND%20text%3D%22%22%3E%3C%2FAPPEND%3E%20%20%20%20%20%20%2F%2F%20I%20would%20like%20to%20set%20a%20scroll%20to%20end%20here%2C%20so%20that%20the%20last%20written%20string%20is%20visible.%3CBR%20%2F%3E)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CP%3EWenn%20ich%20mir%20den%20Anzeigefeldbaum%20ansehe%2C%20sehe%20ich%2C%20dass%20automatisch%20ein%20%E2%80%9EBildlauffeld%E2%80%9C%20um%20das%20Skriptfeld%20herum%20erstellt%20wird%2C%20aber%20ich%20habe%20keine%20M%C3%B6glichkeit%20gefunden%2C%20darauf%20zuzugreifen.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EIrgendein%20Vorschlag%3F%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EDanke%3C%2FP%3E%3CP%3EMatteo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-750422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomatisierung%20und%20Skripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-750449%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20ScriptBox-Scrollen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-750449%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EF%C3%BCr%20das%20Skriptfeld%20k%C3%B6nnen%20Sie%20%E2%80%9EZeile%20festlegen%E2%80%9C%20verwenden%2C%20um%20zu%20einer%20bestimmten%20Zeile%20zu%20gelangen.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Aw%20%3D%20New%20Window(%22a%22%2C%20sb%20%3D%20Script%20Box())%3B%0Amaxcount%20%3D%20100%3B%0A%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%3D%20maxcount%2C%20i%2B%2B%2C%0A%09sb%20%26lt%3B%26lt%3B%20append%20text(Char(i)%20%7C%7C%20%22%5C!N%22)%3B%20%20%20%20%20%20%2F%2F%20I%20would%20like%20to%20set%20a%20scroll%20to%20end%20here%2C%20so%20that%20the%20last%20written%20string%20is%20visible.%0A)%3B%0A%0Alines%20%3D%20sb%20%26lt%3B%26lt%3B%20get%20lines%3B%0A%0Asb%20%26lt%3B%26lt%3B%20Set%20Line%20Text(N%20Items(lines)%2C%20Char(lines%5BN%20Items(lines)%5D))%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EDie%20Scrollbox%2C%20die%20die%20Skriptbox%20umschlie%C3%9Ft%2C%20scheint%20eine%20Art%20seltsame%20Scrollbox%20zu%20sein%20(es%20ist%20immer%20noch%20eine%20Skriptbox%20...)%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Anw%20%3D%20New%20Window(%22a%22%2C%20sb%20%3D%20Script%20Box())%3B%0Amaxcount%20%3D%20100%3B%0A%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%20maxcount%2C%20i%2B%2B%2C%0A%09sb%20%26lt%3B%26lt%3B%20append%20text(Char(i)%20%7C%7C%20%22%5C!N%22)%3B%20%20%20%20%20%20%2F%2F%20I%20would%20like%20to%20set%20a%20scroll%20to%20end%20here%2C%20so%20that%20the%20last%20written%20string%20is%20visible.%0A)%3B%0A%0Ascroll%20%3D%20nw%5BScrollBox(1)%5D%3B%0AShow(scroll%20%26lt%3B%26lt%3B%20Class%20Name)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-750451%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20ScriptBox-Scrollen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-750451%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDanke%2C%20es%20funktioniert!%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EMatteo%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
matteo_patelmo
Level IV

ScriptBox scrolling

Hi, I would like to scroll the following script box to the end, so that the last string written is always visible. 

 

w=new window("a", sb=script box());

for (i=1, i<=100, i++,
		sb<<append text(char(i) || "\!N");
// I would like to set a scroll to end here, so that the last written string is visible.
);

By instpect the the display box tree, I see that a "scroll box" is automatically created around the script box, but I have not found a way to access it.  

 

Any suggestion?

 

thanks

Matteo

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: ScriptBox scrolling

For script box you can use Set Line to go to specific line

Names Default To Here(1);

w = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i <= maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

lines = sb << get lines;

sb << Set Line Text(N Items(lines), Char(lines[N Items(lines)]));

The scrollbox which wraps script box seems to be some sort of weird scrollbox (it is still scriptbox..)

Names Default To Here(1);

nw = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i < maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

scroll = nw[ScrollBox(1)];
Show(scroll << Class Name);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: ScriptBox scrolling

For script box you can use Set Line to go to specific line

Names Default To Here(1);

w = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i <= maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

lines = sb << get lines;

sb << Set Line Text(N Items(lines), Char(lines[N Items(lines)]));

The scrollbox which wraps script box seems to be some sort of weird scrollbox (it is still scriptbox..)

Names Default To Here(1);

nw = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i < maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

scroll = nw[ScrollBox(1)];
Show(scroll << Class Name);
-Jarmo
matteo_patelmo
Level IV

Re: ScriptBox scrolling

Thanks, it works!

 

Matteo

Recommended Articles