<?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: Get currently executing line number of script as a variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/687954#M87362</link>
    <description>&lt;P&gt;It doesn't appear this is an option, but perhaps this workaround will do the trick for you.&amp;nbsp; Put the entire text of the script into a variable at the beginning of the script.&amp;nbsp; First line could be something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;script_text = Load Text File( "Path\script.jsl" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then, whenever you want to tell the user what line is executing,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//marker001&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Write( "The script has now progressed to line number ", Contains( Words( script_text, "\!N" ), "//marker001" ) + 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Just make sure "//marker###" is the only text on its line.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2023 13:02:28 GMT</pubDate>
    <dc:creator>mmarchandTSI</dc:creator>
    <dc:date>2023-10-17T13:02:28Z</dc:date>
    <item>
      <title>Get currently executing line number of script as a variable</title>
      <link>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/687805#M87342</link>
      <description>&lt;P&gt;I'd like to send progress messages to the log that include the currently executing line number of the script. If I never changed the script of course I could just hard-code the line number into the message. But when I add/delete lines in the course of editing, the line numbers change. So is there a function that gives you the currently executing line number, so I could incorporate something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Write("The script has now progressed to line number ", CurrentlyExecutingLine())&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Oct 2023 03:35:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/687805#M87342</guid>
      <dc:creator>john_madden</dc:creator>
      <dc:date>2023-10-17T03:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get currently executing line number of script as a variable</title>
      <link>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/687954#M87362</link>
      <description>&lt;P&gt;It doesn't appear this is an option, but perhaps this workaround will do the trick for you.&amp;nbsp; Put the entire text of the script into a variable at the beginning of the script.&amp;nbsp; First line could be something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;script_text = Load Text File( "Path\script.jsl" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then, whenever you want to tell the user what line is executing,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//marker001&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Write( "The script has now progressed to line number ", Contains( Words( script_text, "\!N" ), "//marker001" ) + 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Just make sure "//marker###" is the only text on its line.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 13:02:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/687954#M87362</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-10-17T13:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get currently executing line number of script as a variable</title>
      <link>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/688215#M87391</link>
      <description>&lt;P&gt;Thanks. You'll admit, I'm sure, that it's kluge-y. But it's definitely clever!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 00:32:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-currently-executing-line-number-of-script-as-a-variable/m-p/688215#M87391</guid>
      <dc:creator>john_madden</dc:creator>
      <dc:date>2023-10-18T00:32:25Z</dc:date>
    </item>
  </channel>
</rss>

