Choose Language Hide Translation Bar
Highlighted
gkrjqu7
Level II

How to locate "button" from border box/list box?

Hey everyone,

 

I am new to JSL, and what im trying to do here:

open NEW WINDOW ->

enter item id -> click "OK" button ->

locate that item file (excel)     -> look up the comment in that excel file

 

However, I am stuck in the early stage to extract TEXT EDIT BOX using button "OK"

I tried google it, but all i could find is using basic modal box.

 

It would be appreciated if anyone can help:)

 

 

jsl_button.png

 

Following is the error message:

 

Cannot subscript Display Box in access or evaluation of 'Subscript' , w[/*###*/"Button"] == 1,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How to locate "button" from border box/list box?

The structure you are following is intended for Modal windows.  Here is an example that I believe is more along the lines you want.  You should really take the time to read the Scripting Guide.    

     Help==>Books==>Scripting Guide

Names Default To Here( 1 );

w = New Window( "Data and Limits file",
	Border Box( top( 55 ), bottom( 55 ), Left( 66 ), Right( 66 ),
		V List Box(
			H Center Box( Text Box( "Locate item" ) ),
			Spacer Box( size( 1, 11 ) ),
			H List Box( Text Box( "item ID:     " ), D = Text Edit Box( Char( "     6 DIGITS" ) ), ),
			Spacer Box( size( 1, 11 ) ),
			Text Box( "Click SHOW for the ERROR MSG(S)" ),
			Button Box( "OK",
				id = D << get text();
				str = "S:\dir path\" || id || ".xls";
				str_x = "S:\dir path\" || id || ".xlsx";
				If(
					File Exists( str ), Show( "found " || str ),
					File Exists( str_x ), Show( "found  " || str_x ),
					Show( "neither file found" )
				);
				w << close window;
			),
			Spacer Box( size( 1, 11 ) ),
			Spacer Box( size( 1, 33 ) ),
			H Center Box( Text Box( "Error Code | Messages(S)" ) ),
			Spacer Box( size( 1, 11 ) ), 

		), 

	)
);

 

Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: How to locate "button" from border box/list box?

The structure you are following is intended for Modal windows.  Here is an example that I believe is more along the lines you want.  You should really take the time to read the Scripting Guide.    

     Help==>Books==>Scripting Guide

Names Default To Here( 1 );

w = New Window( "Data and Limits file",
	Border Box( top( 55 ), bottom( 55 ), Left( 66 ), Right( 66 ),
		V List Box(
			H Center Box( Text Box( "Locate item" ) ),
			Spacer Box( size( 1, 11 ) ),
			H List Box( Text Box( "item ID:     " ), D = Text Edit Box( Char( "     6 DIGITS" ) ), ),
			Spacer Box( size( 1, 11 ) ),
			Text Box( "Click SHOW for the ERROR MSG(S)" ),
			Button Box( "OK",
				id = D << get text();
				str = "S:\dir path\" || id || ".xls";
				str_x = "S:\dir path\" || id || ".xlsx";
				If(
					File Exists( str ), Show( "found " || str ),
					File Exists( str_x ), Show( "found  " || str_x ),
					Show( "neither file found" )
				);
				w << close window;
			),
			Spacer Box( size( 1, 11 ) ),
			Spacer Box( size( 1, 33 ) ),
			H Center Box( Text Box( "Error Code | Messages(S)" ) ),
			Spacer Box( size( 1, 11 ) ), 

		), 

	)
);

 

Jim

View solution in original post

Highlighted
gkrjqu7
Level II

Re: How to locate "button" from border box/list box?

Will do, thanks for your help.
Article Labels

    There are no labels assigned to this post.