For example, automatically runs the specified JSL when the cursor clicks on a cell?
Thanks!
Yes.
See the item "Web" in the JMP Scripting Index:
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:age << Set Property( "Event Handler", Event Handler( Click( JSL Quote( Function( {dt, col, row}, Caption( "You clicked on row " || Char( row ) ); Wait( 1 ); Caption( Remove ) ) ) ) ) )
wonderful
I'd like to move on to a more specific example:dt=Open("$SAMPLE_DATA/Hair Care Product.jmp");
How to click on a cell in column 1, column 2 rangeHow to write JSL to implement:1, automatically assign the value of this cell to the variable,2, and then in the first column, the second column in the range of rows are this value of the cells to change the color of the cell to pink, not this value to cancel the color.For example, in my screenshot, I clicked dt[1175,1].
dt = Current Data Table(); ab = (dt << get selected rows)[1]; aaa = Column( dt, (dt << get selected columns)[1] )[(dt << get selected rows)[1]]; r = N Row( dt ); i = 1; j = 1; For( j = 1, j <= r, j++, For( i = 1, i <= 2, i++, If( dt[j, i ] == aaa, Column( i ) << Color Cells( "red", j ), Column( i ) << Color Cells( "white", j ) ) ) );
This is the only script I can write.