<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>On 4 mei '12, michael.vancanneyt@wisa.be wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<pre>
On Fri, 4 May 2012, <a href="mailto:michael.vancanneyt@wisa.be">michael.vancanneyt@wisa.be</a>wrote:</pre>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">On Fri, 4 May 2012, <a href="mailto:dhkblaszyk@zeelandnet.nl">dhkblaszyk@zeelandnet.nl</a>wrote:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a way to alter this location programatically to the script location? Is there an alternative way?</blockquote>
The solution can be found on <a href="http://www.freepascal.org/docs-html/prog/progsu38.html">http://www.freepascal.org/docs-html/prog/progsu38.html</a> Const ScriptName = {$INCLUDE FILE};</blockquote>
<pre>Come to think of it, probably not 100% what you want.
It will contain the name of the temporary script file.
Michael.
_______________________________________________
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a>
</pre>
</blockquote>
<p>Indeed, it's not. ScriptName will contain "configure.ppx.pas". What I want it that ParamStr(0) will contain the full filename to the script file instead of the compiled version. This should be the default behaviour imho b ecause it's an "executable" script and not a source file anymore.</p>
<p> </p>
<p>Regards, Darius</p>
<p> </p>
<div> </div>
</body></html>