Jump to content
Sign in to follow this  
ElSoloMar

How to Find Full Path of Current INCLUDED Script?

Recommended Posts

AutoIters,

As you already know the handy macro '@ScriptDir' contains the full path of the script passed to AutoIt :lmao: and this macro remains the same during the whole execution :whistle: . You also know that scripts can '#include' other scripts, right? :P ; now, Is there a way to find out the full path of the included scripts while the interpreter is running them? o:) For example: is there a macro or global variable ($CurrentScriptDir, $IncludedScriptDir, etc.) or perhaps a function (FileCurrentScriptDir, FileIncludedScriptDir, etc) that can help me to get the path of the current(executing) script? , not the first(passed) script to AutoIt :) .

I need to do this because I am traying to install a file in the same directory where an included script is at :). The included script is in a different location than the script that I am running. :)

TIA, and hope to hear from you guys soon!

Refer to this suggestion :huh2: for another explanation.

Edited by ElSoloMar

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites

now, Is there a way to find out the full path of the included scripts while the interpreter is running them? :lmao:

<{POST_SNAPBACK}>

AutoIT3 uses the following entry from the registry:

HKEY_LOCAL_MACHINE, "Software\AutoIt v3\AutoIt" " InstallDir" and adds "\include" to it to find the INCLUDE files.

The installer creates this registry entry ....


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

AutoIT3 uses the following entry from the registry:

HKEY_LOCAL_MACHINE, "Software\AutoIt v3\AutoIt" " InstallDir"  and adds "\include" to it to find the  INCLUDE files.

The installer creates this registry entry ....

<{POST_SNAPBACK}>

Thanks, but I already know that information. Please, read my explanation above careeeefully.

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites

Include files don't work that way. They opnly have a path at compile-time.

At runtime, they are already compiled as part of the executable script, and any knowledge is lost (irrelevant/not-applicable) of where they were when the script was source.

:lmao:

Share this post


Link to post
Share on other sites

Thanks, but I already know that information. Please, read my explanation above careeeefully.

<{POST_SNAPBACK}>

Sure... I promise I'll read your post better the next time before answering... :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Include files don't work that way. They opnly have a path at compile-time.

At runtime, they are already compiled as part of the executable script, and any knowledge is lost (irrelevant/not-applicable) of where they were when the script was source.

:)

<{POST_SNAPBACK}>

I also kept in mind the information that you mentioned... I did not mentioned compiled the script, but executing it through the interpreter. Again, thanks for the answer but since you are the second person that seems not to understand what I am trying to do I will post another topic with a better explanation so you guys can offer more accurated suggestions. I will work in a better explanation and perhaps some diagrams. See you later. Edited by ElSoloMar

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites

Sure...  I promise I'll read your post better the next time before answering...  :)

<{POST_SNAPBACK}>

Thanks again! It is not your foult! I am working in a better way to explain what I am trying to do. Please, keep your eyes open for my next topic on this matter and thanks again for the suggestion. See you around!

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites

Refer to this suggestion for :) another explanation.

Edited by ElSoloMar

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...