<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can JMP automatically run JSL when the cursor clicks on a cell? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662779#M85152</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
ab = (dt &amp;lt;&amp;lt; get selected rows)[1];
aaa = Column( dt, (dt &amp;lt;&amp;lt; get selected columns)[1] )[(dt &amp;lt;&amp;lt; get selected rows)[1]];
r = N Row( dt );
i = 1;
j = 1;
For( j = 1, j &amp;lt;= r, j++,
	For( i = 1, i &amp;lt;= 2, i++,
		If( dt[j, i ] == aaa,
			Column( i  ) &amp;lt;&amp;lt; Color Cells( "red", j ),
			Column( i  ) &amp;lt;&amp;lt; Color Cells( "white", j )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;This is the only script I can write.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 04:01:23 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2023-07-27T04:01:23Z</dc:date>
    <item>
      <title>Can JMP automatically run JSL when the cursor clicks on a cell?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662406#M85124</link>
      <description>&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;For example, automatically runs the specified JSL when the cursor clicks on a cell？&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 08:02:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662406#M85124</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-26T08:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP automatically run JSL when the cursor clicks on a cell?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662545#M85133</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the item "Web" in the JMP Scripting Index:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:age &amp;lt;&amp;lt; Set Property( "Event Handler", Event Handler( Click( JSL Quote( Function( {dt, col, row}, Caption( "You clicked on row " || Char( row ) ); Wait( 1 ); Caption( Remove ) ) ) ) ) )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2023 13:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662545#M85133</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2023-07-26T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP automatically run JSL when the cursor clicks on a cell?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662582#M85136</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;SPAN class=""&gt;&lt;A target="_blank"&gt;wonderful&lt;/A&gt;&lt;/SPAN&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thanks!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-07-26_22-30-00.png" style="width: 696px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/55287iF27F6024681B8031/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-07-26_22-30-00.png" alt="2023-07-26_22-30-00.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 14:33:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662582#M85136</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-26T14:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP automatically run JSL when the cursor clicks on a cell?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662778#M85151</link>
      <description>&lt;P&gt;I'd like to move on to a more specific example:&lt;BR /&gt;dt=Open("$SAMPLE_DATA/Hair Care Product.jmp");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How to click on a cell in column 1, column 2 range&lt;BR /&gt;How to write JSL to implement:&lt;BR /&gt;1, automatically assign the value of this cell to the variable,&lt;BR /&gt;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.&lt;BR /&gt;For example, in my screenshot, I clicked dt[1175,1].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-07-27_11-49-48.png" style="width: 373px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/55301i6E04D1ED6C0622F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-07-27_11-49-48.png" alt="2023-07-27_11-49-48.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 03:56:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662778#M85151</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-27T03:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP automatically run JSL when the cursor clicks on a cell?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662779#M85152</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
ab = (dt &amp;lt;&amp;lt; get selected rows)[1];
aaa = Column( dt, (dt &amp;lt;&amp;lt; get selected columns)[1] )[(dt &amp;lt;&amp;lt; get selected rows)[1]];
r = N Row( dt );
i = 1;
j = 1;
For( j = 1, j &amp;lt;= r, j++,
	For( i = 1, i &amp;lt;= 2, i++,
		If( dt[j, i ] == aaa,
			Column( i  ) &amp;lt;&amp;lt; Color Cells( "red", j ),
			Column( i  ) &amp;lt;&amp;lt; Color Cells( "white", j )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;This is the only script I can write.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 04:01:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-automatically-run-JSL-when-the-cursor-clicks-on-a-cell/m-p/662779#M85152</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-27T04:01:23Z</dc:date>
    </item>
  </channel>
</rss>

