<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — dlgsavefile mask]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=660&amp;type=atom" />
	<updated>2017-10-27T14:41:58Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=660</id>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3072#p3072" />
			<content type="html"><![CDATA[<p>Just an FYI in case someone were to try my &quot;if&quot; statement.&nbsp; As it turns out, that didn&#039;t work in my case like I thought it did.&nbsp; &quot;ACHAR(LEN_TRIM(OutputFile)-3&quot; returned &quot;&gt;&quot; instead of &quot;.&quot;&nbsp; The following is what I wound up using, and it seems to work fine...</p><p>if(Outputfile(LEN_TRIM(OutputFile)-3:LEN_TRIM(OutputFile)-3)/=&quot;.&quot;) OutputFile=TRIM(OutputFile)//&quot;.csv&quot;</p>]]></content>
			<author>
				<name><![CDATA[Don.Gilbreath]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3769</uri>
			</author>
			<updated>2017-10-27T14:41:58Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3072#p3072</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3068#p3068" />
			<content type="html"><![CDATA[<p>Don,</p><p>No, there isn&#039;t a better way.&nbsp; Windows doesn&#039;t enforce the extension, so the programmer has to do it manually by checking and adding it to the returned filename if necessary.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-24T21:44:38Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3068#p3068</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3067#p3067" />
			<content type="html"><![CDATA[<p>One more thing...<br />To solve my other issue of dlgsavefile not automatically adding &quot;.csv&quot; to the end of a typed-in filename, I used the following line:</p><p>&nbsp; if(ACHAR(LEN_TRIM(OutputFile)-3)/=&quot;.&quot;) OutputFile=TRIM(OutputFile)//&quot;.csv&quot;</p><p>Is this how it&#039;s done or is there a common, more robust way to go?</p>]]></content>
			<author>
				<name><![CDATA[Don.Gilbreath]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3769</uri>
			</author>
			<updated>2017-10-24T20:43:36Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3067#p3067</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3066#p3066" />
			<content type="html"><![CDATA[<p>No I didn&#039;t initialize the contents of either InputFile or OutputFile.&nbsp; Adding InputFile = &quot; &quot; and OutputFile = &quot; &quot; took care of it.&nbsp; Thanks so much!</p><p>(They&#039;re defined as *255.&nbsp; I don&#039;t believe it always did, but a &quot;?&quot; was showing up in the &quot;File name&quot; box of the dialog.&nbsp; Deleting the ? didn&#039;t change the listing.)</p>]]></content>
			<author>
				<name><![CDATA[Don.Gilbreath]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3769</uri>
			</author>
			<updated>2017-10-24T19:24:55Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3066#p3066</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3065#p3065" />
			<content type="html"><![CDATA[<p>Don,</p><p>Are you initializing the filenames to anything?&nbsp; I&#039;m guessing that the variable <em>OutputFile</em> hasn&#039;t been set to, for example, all spaces, and Windows is subsequently restricting the listed files to those that match the presumably unintended contents of <em>OutputFile</em>. </p><p>If you initialize <em>OutputFile</em>, does it work differently?</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-24T19:07:37Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3065#p3065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3064#p3064" />
			<content type="html"><![CDATA[<p>Hmm...I changed it to dlgopenfile and it did the same thing.&nbsp; Is there an issue with using the command twice in a row in the program?&nbsp; The first time it shows the CSV files, but regardless of the 2nd time being dlgopenfile or dlgsavefile, it doesn&#039;t list the CSV files in the folder.&nbsp; Is there another command I need to execute between the dialog box call-outs?</p><p>If(dlgopenfile(InputFile,&quot;*.csv&quot;,&quot;*.csv&quot;,&quot;Input Data File&quot;)) then<br />&nbsp; OPEN(3,FILE=trim(InputFile),ACTION=&quot;READ&quot;)<br />&nbsp; write(*,*) &quot;Input Data File is: &quot;,Trim(InputFile)<br />else<br />&nbsp; write(*,*) &quot;No input file selected.&quot;<br />endif<br />if(dlgsavefile(OutputFile,&quot;*.csv&quot;,&quot;*.csv&quot;,&quot;Output Data File&quot;)) then<br />&nbsp; OPEN(4,FILE=trim(OutputFile),STATUS=&quot;REPLACE&quot;,ACTION=&quot;WRITE&quot;)<br />&nbsp; write(*,*) &quot;Output Data File is: &quot;,Trim(OutputFile)<br />else<br />&nbsp; write(*,*) &quot;No output file selected.&quot;<br />endif</p>]]></content>
			<author>
				<name><![CDATA[Don.Gilbreath]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3769</uri>
			</author>
			<updated>2017-10-24T18:48:12Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3064#p3064</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[dlgsavefile mask]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3063#p3063" />
			<content type="html"><![CDATA[<p>I&#039;m confused about how dlgsavefile is used in Simply Fortran.&nbsp; In my program, I have the following:</p><p>if(dlgsavefile(OutputFile,&quot;*.csv&quot;,&quot;*.csv&quot;,&quot;Output Data File&quot;)) then<br />&nbsp; OPEN(4,FILE=trim(OutputFile),STATUS=&quot;REPLACE&quot;,ACTION=&quot;WRITE&quot;)<br />&nbsp; write(*,*) &quot;Output Data File is: &quot;,Trim(OutputFile)<br />else<br />&nbsp; write(*,*) &quot;No output file selected.&quot;<br />endif</p><p>When the dialog box opens, no CSV files are listed even though they exist in the folder.&nbsp; If I click the &quot;All Files&quot; drop-down, I see them.&nbsp; Also, I expected a new file created with the &quot;*.csv&quot; mask to be a CSV file, but it defaults to no file extension unless you&#039;re choosing a file from the folder.</p><p>dlgopenfile shows the CSV files per the &quot;*.csv&quot; mask, but I don&#039;t expect it was intended for typing a nonexistent file in.</p><p>Is this a bug in the dlgsavefile?&nbsp; I&#039;m using Windows 7.&nbsp; Can I just use dlgopenfile for both opening existing files and either saving over existing files or creating a new file?</p>]]></content>
			<author>
				<name><![CDATA[Don.Gilbreath]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3769</uri>
			</author>
			<updated>2017-10-24T17:57:49Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3063#p3063</id>
		</entry>
</feed>
