<div dir="ltr">Perhaps try:<br><b><br>Public Sub Form_Open()</b><b><br></b><b><br></b><b> 'Dim $runtoday As Boolean = True</b><b><br></b><b><br></b><b> Args.Begin()</b><span class="gmail-im" style="color:rgb(80,0,80)"><b><br></b><b> 'If Args.Has("t", "today", "Run plots for today") Then $runtoday = True</b><b><br></b></span><b> Print </b>Args.Has("t", "today", "Run plots for today")<b> </b><div><b>Args.End</b><b><br></b><b><br></b><b> 'Print $runtoday</b><b><br></b><b><br></b><b>End</b><br><br>Compile and run and check whether you get the correct values for Args.Has<br><br>That way you'll see under what initial value you need to give to $runtoday and whether you need to modify your if slightly to get the functionality you need<br><br>Hope this helps<br><br><br>Regards,<br>Dimtiris<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 13, 2020 at 9:44 AM Charlie Ogier <<a href="mailto:charlie@cogier.com">charlie@cogier.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>This code works for me.<br>
<br>
<b>Public Sub Form_Open()</b><b><br>
</b><b><br>
</b><b> Dim $runtoday As Boolean = True</b><b><br>
</b><b><br>
</b><b> Args.Begin()</b><b><br>
</b><b> If Args.Has("t", "today", "Run plots for today") Then
$runtoday = True</b><b><br>
</b><b> Args.End</b><b><br>
</b><b><br>
</b><b> Print $runtoday</b><b><br>
</b><b><br>
</b><b>End</b><b><br>
</b><b><br>
</b>The result is <b>True</b> even if there is no <b>-t</b>,
tested with 'global' and local Boolean. This was done in the IDE.
<br>
<br>
Charlie<br>
<br>
On 13/02/2020 09:10, Bruce wrote:<br>
</div>
<blockquote type="cite">If
Args.Has("t", "today", "Run plots for today") Then $runtoday =
True
<br>
<br>
I have probably done something wrong here but if $runtoday has
already been set True then that line, if there is no "-t" on the
command line seems to set $runtoday false.
<br>
<br>
(Unless I have done something stupid somewhere else?)
<br>
<br>
Any clues? There doesn't seem to be a default value for "If
Args.Has" mentioned in the help docs.
<br>
<br>
tia
<br>
b
<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----
<br>
</blockquote>
<br>
</div>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>