<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>How to launch a windows help file ?</title>
		<link>http://www.allegro.cc/forums/view/591583</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 26 May 2007 04:58:50 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can any one tell me how to launch a windows .hlp file from within an allegro program? Specifically what function calls I need to make and what #include is that function in. Also helpfull would be how to flip to a specific page in that help file.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Wilson Saunders)</author>
		<pubDate>Sat, 26 May 2007 03:57:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>system(&quot;start helpfile.hlp&quot;); ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sat, 26 May 2007 04:32:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks BAF that was what I was looking for. You have been a lot more helpfull than google and msdn on this topic. By the way do you know how to make it open on a specific page of that help file?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Wilson Saunders)</author>
		<pubDate>Sat, 26 May 2007 04:42:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There are more &quot;friendly&quot; ways, like using the Windows API (they may have specific help stuff, as well) like CreateProcess or whatever, but system will work just fine in most cases.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sat, 26 May 2007 04:44:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Since I am not too knowlagable in the windows API or even this magical &quot;system&quot; command. I was wondering if I could append any arguments to the string to get the help file to open to a specific page.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Wilson Saunders)</author>
		<pubDate>Sat, 26 May 2007 04:52:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I am not too knowlagable in ... this magical &quot;system&quot; command
</p></div></div><p>
They system() function will execute any command you can in the dos-prompt.<br />It&#39;s like you&#39;re actually typing the command into the prompt.</p><p>To go directly to a certain page in a help file, I don&#39;t know if that can be done.</p><p>Here is what you can do with the start command though
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>Starts a separate <a href="http://www.delorie.com/djgpp/doc/libc/libc_865.html" target="_blank">window</a> to run a specified program <span class="k1">or</span> command.</td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td>START <span class="k2">[</span><span class="s">"title"</span><span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>Dpath<span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>I<span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>MIN<span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>MAX<span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>SEPARATE <span class="k3">|</span> <span class="k3">/</span>SHARED<span class="k2">]</span></td></tr><tr><td class="number">4</td><td>      <span class="k2">[</span><span class="k3">/</span>LOW <span class="k3">|</span> <span class="k3">/</span>NORMAL <span class="k3">|</span> <span class="k3">/</span>HIGH <span class="k3">|</span> <span class="k3">/</span>REALTIME <span class="k3">|</span> <span class="k3">/</span>ABOVENORMAL <span class="k3">|</span> <span class="k3">/</span>BELOWNORMAL<span class="k2">]</span></td></tr><tr><td class="number">5</td><td>      <span class="k2">[</span><span class="k3">/</span>WAIT<span class="k2">]</span> <span class="k2">[</span><span class="k3">/</span>B<span class="k2">]</span> <span class="k2">[</span>command<span class="k3">/</span>program<span class="k2">]</span></td></tr><tr><td class="number">6</td><td>      <span class="k2">[</span>parameters<span class="k2">]</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td>    <span class="s">"title"</span>     Title to display in  <a href="http://www.delorie.com/djgpp/doc/libc/libc_865.html" target="_blank">window</a> title bar.</td></tr><tr><td class="number">9</td><td>    path        Starting directory</td></tr><tr><td class="number">10</td><td>    B           Start application without creating a <span class="k1">new</span> window. The</td></tr><tr><td class="number">11</td><td>                application has ^C handling ignored. Unless the application</td></tr><tr><td class="number">12</td><td>                enables ^C processing, ^Break is the only way to interrupt</td></tr><tr><td class="number">13</td><td>                the application</td></tr><tr><td class="number">14</td><td>    I           The <span class="k1">new</span> environment will be the original environment passed</td></tr><tr><td class="number">15</td><td>                to the cmd.exe <span class="k1">and</span> <span class="k1">not</span> the current environment.</td></tr><tr><td class="number">16</td><td>    MIN         Start <a href="http://www.delorie.com/djgpp/doc/libc/libc_865.html" target="_blank">window</a> minimized</td></tr><tr><td class="number">17</td><td>    MAX         Start <a href="http://www.delorie.com/djgpp/doc/libc/libc_865.html" target="_blank">window</a> maximized</td></tr><tr><td class="number">18</td><td>    SEPARATE    Start <span class="n">16</span><span class="k3">-</span>bit Windows program in separate memory space</td></tr><tr><td class="number">19</td><td>    SHARED      Start <span class="n">16</span><span class="k3">-</span>bit Windows program in shared memory space</td></tr><tr><td class="number">20</td><td>    LOW         Start application in the IDLE priority <span class="k1">class</span></td></tr><tr><td class="number">21</td><td>    NORMAL      Start application in the NORMAL priority <span class="k1">class</span></td></tr><tr><td class="number">22</td><td>    HIGH        Start application in the HIGH priority <span class="k1">class</span></td></tr><tr><td class="number">23</td><td>    REALTIME    Start application in the REALTIME priority <span class="k1">class</span></td></tr><tr><td class="number">24</td><td>    ABOVENORMAL Start application in the ABOVENORMAL priority <span class="k1">class</span></td></tr><tr><td class="number">25</td><td>    BELOWNORMAL Start application in the BELOWNORMAL priority <span class="k1">class</span></td></tr><tr><td class="number">26</td><td>    WAIT        Start application <span class="k1">and</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_858.html" target="_blank">wait</a> <span class="k1">for</span> it to terminate</td></tr><tr><td class="number">27</td><td>    command<span class="k3">/</span>program</td></tr><tr><td class="number">28</td><td>                If it is an internal cmd command <span class="k1">or</span> a batch file then</td></tr><tr><td class="number">29</td><td>                the command processor is run with the <span class="k3">/</span>K <span class="k1">switch</span> to cmd.exe.</td></tr><tr><td class="number">30</td><td>                This means that the <a href="http://www.delorie.com/djgpp/doc/libc/libc_865.html" target="_blank">window</a> will remain after the command</td></tr><tr><td class="number">31</td><td>                has been run.</td></tr><tr><td class="number">32</td><td>&#160;</td></tr><tr><td class="number">33</td><td>                If it is <span class="k1">not</span> an internal cmd command <span class="k1">or</span> batch file then</td></tr><tr><td class="number">34</td><td>                it is a program <span class="k1">and</span> will run as either a windowed application</td></tr><tr><td class="number">35</td><td>                <span class="k1">or</span> a console application.</td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>    parameters  These are the parameters passed to the command<span class="k3">/</span>program</td></tr><tr><td class="number">38</td><td>&#160;</td></tr><tr><td class="number">39</td><td>&#160;</td></tr><tr><td class="number">40</td><td>If Command Extensions are enabled, external command invocation</td></tr><tr><td class="number">41</td><td>through the command <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a> <span class="k1">or</span> the START command changes as follows:</td></tr><tr><td class="number">42</td><td>&#160;</td></tr><tr><td class="number">43</td><td>non-executable files may be invoked through their file association just</td></tr><tr><td class="number">44</td><td>    by typing the name of the file as a command.  <span class="k2">(</span>e.g.  WORD.DOC would</td></tr><tr><td class="number">45</td><td>    launch the application associated with the .DOC file extension<span class="k2">)</span>.</td></tr><tr><td class="number">46</td><td>    See the ASSOC <span class="k1">and</span> FTYPE commands <span class="k1">for</span> how to create these</td></tr><tr><td class="number">47</td><td>    associations from within a command script.</td></tr><tr><td class="number">48</td><td>&#160;</td></tr><tr><td class="number">49</td><td>When executing an application that is a <span class="n">32</span><span class="k3">-</span>bit GUI application, CMD.EXE</td></tr><tr><td class="number">50</td><td>    does <span class="k1">not</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_858.html" target="_blank">wait</a> <span class="k1">for</span> the application to terminate before returning to</td></tr><tr><td class="number">51</td><td>    the command prompt.  This <span class="k1">new</span> behavior does NOT occur <span class="k1">if</span> executing</td></tr><tr><td class="number">52</td><td>    within a command script.</td></tr><tr><td class="number">53</td><td>&#160;</td></tr><tr><td class="number">54</td><td>When executing a command <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a> whose first token is the string <span class="s">"CMD "</span></td></tr><tr><td class="number">55</td><td>    without an extension <span class="k1">or</span> path qualifier, then <span class="s">"CMD"</span> is replaced with</td></tr><tr><td class="number">56</td><td>    the value of the COMSPEC variable.  This prevents picking up CMD.EXE</td></tr><tr><td class="number">57</td><td>    from the current directory.</td></tr><tr><td class="number">58</td><td>&#160;</td></tr><tr><td class="number">59</td><td>When executing a command <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a> whose first token does NOT contain an</td></tr><tr><td class="number">60</td><td>    extension, then CMD.EXE uses the value of the PATHEXT</td></tr><tr><td class="number">61</td><td>    environment variable to determine which extensions to look <span class="k1">for</span></td></tr><tr><td class="number">62</td><td>    <span class="k1">and</span> in what order.  The <span class="k1">default</span> value <span class="k1">for</span> the PATHEXT variable</td></tr><tr><td class="number">63</td><td>    is:</td></tr><tr><td class="number">64</td><td>&#160;</td></tr><tr><td class="number">65</td><td>        .COM<span class="k2">;</span>.EXE<span class="k2">;</span>.BAT<span class="k2">;</span>.CMD</td></tr><tr><td class="number">66</td><td>&#160;</td></tr><tr><td class="number">67</td><td>    Notice the syntax is the same as the PATH variable, with</td></tr><tr><td class="number">68</td><td>    semicolons separating the different elements.</td></tr><tr><td class="number">69</td><td>&#160;</td></tr><tr><td class="number">70</td><td>When searching <span class="k1">for</span> an executable, <span class="k1">if</span> there is no match on any extension,</td></tr><tr><td class="number">71</td><td>then looks to see <span class="k1">if</span> the name matches a directory name.  If it does, the</td></tr><tr><td class="number">72</td><td>START command launches the Explorer on that path.  If done from the</td></tr><tr><td class="number">73</td><td>command <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a>, it is the equivalent to doing a CD <span class="k3">/</span>D to that path.</td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Dalrymple)</author>
		<pubDate>Sat, 26 May 2007 04:57:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just ShellExecute is more straightforward and pretty damn simple too, y&#39;know.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Sat, 26 May 2007 04:58:50 +0000</pubDate>
	</item>
</rss>
