Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#713 closed Feature Request (Rejected)

FileInstall() to accept macros and environment variables.

Reported by: Hubertus Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: FileInstall macros environment-variables Cc:

Description

It would be handy, if FileInstall() would accept macros and environment variables.
This information is available at compile time.
The syntax could look like this:

FileInstall("%USERPROFILE%\Eigene Dateien\AutoIt\@scriptname@", $sTempfile)
Or
FileInstall("@MyDocumentsDir@\AutoIt\@scriptname@", $sTempfile)
Or
FileInstall("@ScriptFullPath@", $sTempfile)

Change History (4)

comment:1 Changed 16 years ago by TicketCleanup

  • Version 3.2.12.1 deleted

Automatic ticket cleanup.

comment:2 Changed 16 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

While it is true those expressions are available at compile-time they are also different than the run-time counter-parts. It's just unnecessary confusion. There are better ways to solve the problem.

comment:3 Changed 16 years ago by ken@…

A path should never be hard coded into source code. This requirement keeps me from sharing scripts that I create with others unless their file structure is configured the same way as mine. A couple of alternatives would be to have a registry key that would tell AutoIt where to look for files to install. You would then use a relative path in the FileInstall function. The other way would be to have a files folder within the AutoIt include folder. The FileInstall source path would then be relative to that path for example FileInstall ("MyFiles\MyFile.Ext", $destPath) would look for MyFile.Ext in <AutoIt Include>\MyFiles\MyFile.Ext)

comment:4 Changed 16 years ago by Valik

I don't think you really understand how FileInstall() works. I suggest you not comment on the subject further until you realize how the function behaves because you're making a lot of assumptions and spouting a lot of gibberish that just doesn't make sense to someone who understands how FileINstall() works.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.