<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 585: Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/585/" rel="alternate"/><link href="https://sourceforge.net/p/gnuplot/feature-requests/585/feed.atom" rel="self"/><id>https://sourceforge.net/p/gnuplot/feature-requests/585/</id><updated>2025-05-12T07:34:07.486000Z</updated><subtitle>Recent changes to 585: Windows: Access to positional command-line arguments (ARGV/ARGC)</subtitle><entry><title>#585 Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/585/?limit=25#2d8d" rel="alternate"/><published>2025-05-12T07:34:07.486000Z</published><updated>2025-05-12T07:34:07.486000Z</updated><author><name>Daniel Dan K.</name><uri>https://sourceforge.net/u/daniel29/</uri></author><id>https://sourceforge.net21b775393cf263407f29831f75df63630acb92f3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK, my suggestion basically boils down to reduce the length of the commandline from&lt;br/&gt;
&lt;code&gt;gnuplot -c plot.gp data.txt foo.png&lt;/code&gt;&lt;br/&gt;
to&lt;br/&gt;
&lt;code&gt;plot.gp data.txt foo.png&lt;/code&gt; on Windows.&lt;/p&gt;
&lt;p&gt;Reconsidering this suggestion, I now think this is not worth the hassle. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#585 Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/585/?limit=25#9bf3" rel="alternate"/><published>2025-04-16T11:35:12.955000Z</published><updated>2025-04-16T11:35:12.955000Z</updated><author><name>Daniel Dan K.</name><uri>https://sourceforge.net/u/daniel29/</uri></author><id>https://sourceforge.net0ec66b5481519acc9c7459bc96d3f62cfeaeb66d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Another alternative came to my mind: honor command line flags and options when called by a script, e.g.,&lt;br/&gt;
&lt;code&gt;plot.gp -c data.txt foo.png&lt;/code&gt;&lt;br/&gt;
Yet I don't even know if that is possible in Windows.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/585/" rel="alternate"/><published>2025-04-16T11:10:29.111000Z</published><updated>2025-04-16T11:10:29.111000Z</updated><author><name>Daniel Dan K.</name><uri>https://sourceforge.net/u/daniel29/</uri></author><id>https://sourceforge.net4aec93e7e33d3d7cdfd686dee8e5a8ea68352dfe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;tl;dr: How to call gnuplot through a gnuplot script and have positional parameters available?&lt;/p&gt;
&lt;p&gt;On Windows, the extension &lt;strong&gt;.gp&lt;/strong&gt; is associated with gnuplot. I think this is done by the installer. Anyway, when a gnuplot script has the suffix &lt;strong&gt;.gp&lt;/strong&gt;,e.g., &lt;strong&gt;plot.gp&lt;/strong&gt;, I can enter &lt;strong&gt;plot.gp&lt;/strong&gt; on the Windows commandline and gnuplot gets called and executes this script.&lt;/p&gt;
&lt;p&gt;Further, I know that positional parameters can be activated by adding the flag "-c" to the command line, e.g., &lt;br/&gt;
&lt;code&gt;gnuplot -c plot.gp data.txt foo.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, with the simple file association available in Windows, I cannot add the flag "-c" to the commandline without manually fiddling in the registry, can I? Is there a simple way to activate positional parameters when scripting gnuplot on Windows?&lt;/p&gt;
&lt;p&gt;If this is not yet possible, I'd like to suggest  to implement a "Windows shebang" feature: &lt;br/&gt;
I suggest that command line parameters and flags can be conveyed to gnuplot by adding them to the first line in the script which is marked with "#!", for example:&lt;br/&gt;
&lt;code&gt;#! -c&lt;/code&gt;&lt;br/&gt;
would pass the flag "-c" to gnuplot in order to activate positional parameters.&lt;/p&gt;
&lt;p&gt;Alternatively, always activate positional parameters when called by a script.&lt;/p&gt;
&lt;p&gt;Does that make sense? Please let me have your comments. Thanks.&lt;br/&gt;
Dan&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>