<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 11/3/2018 1:20 PM, James wrote:<br>
</div>
<blockquote type="cite"
cite="mid:03c401d473b2$ac340410$049c0c30$@productionautomation.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:12.0pt">>And you
can't just pop up a dialog window without having a window/form
in the first place. <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">That’s
probably my problem… My idea of just calling up the
windows-API to get the save-as dialog probably won’t work
without a form, even though I was able to get message boxes
working<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
>In general, the logic of a GUI based program (regardless
if Windows, macOS, Linux, etc) simply is different from a
console program. Your console program main loop simply pretty
much just becomes a procedure within the GUI main loop.<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">This logic
difference is what is most confusing to me. I just don’t
know where to put my main program and I don’t know how to
output things to some kind of text box. I don’t want the
user to do anything at all unless it’s necessary… so if
everything is set up correctly, the program opens, does it’s
thing, writes some status stuff to a text box and closes, no
buttons to push or anything…. If I get a GUI program to work,
I guess I can put a percentage complete barograph somewhere.
If there’s an error, I need to stop and wait for
acknowledgement of the error, or if the output file was not
specified, I want the Save-As box to just open up on it’s own
with out anyone pushing any buttons, and when the save-as box
is closed the process completes on it’s own and the program
exits without any further user intervention. </p>
</div>
</blockquote>
I had that problem many years ago as well, having literally written
hundreds of console of TUI based programs, mainly on DOS, myself.
And then switching some of them to a GUI program in Delphi (there
was no Lazarus at that time) took quite a bit of rethinking of a
couple of decades habits in console/command line ways or even self
written TUI programs.<br>
<blockquote type="cite"
cite="mid:03c401d473b2$ac340410$049c0c30$@productionautomation.net">
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I’ve been
tinkering with Lazarus, and I managed to get a form with some
buttons based on the examples, and I did make one button open
the save-as box… but I’m clueless on how to make the save-as
box only come up when needed and by a programming command, not
because someone pushed a button. I still can’t figure out how
to write my writeln’s into a text box of some sort. I get
the idea… instead of a sequential program the executes from
beginning to end, everything kind of all happens at the same
time</p>
</div>
<br>
</blockquote>
Yup, all the windows (as in GUI) stuff happens all the time, at the
same time as your actual program. I have no had a program myself
where I had a dialog "come up out of the blue" (as you kind of
describe it), but I have written a lot of data conversion programs
that at some point required to open up an additional open or save
dialog. A lot though depends on what the actual logic behind the
actual processing of your console program is. A lot of times, it
might take a bit of re-organizing.<br>
I am a bit short of time, as I am dealing on and off all day with
some CERT stuff, but I will see that I take a closer look at that
program (snippet?) that you posted later today or tomorrow morning
and return a rough sample of a GUI "solution" for it...<br>
<br>
Ralf<br>
<br>
<p><br>
</p>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>