Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 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)

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 17 years ago

Version: 3.2.12.1

Automatic ticket cleanup.

comment:2 by Valik, 17 years ago

Resolution: Rejected
Status: newclosed

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 by ken@…, 17 years ago

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 by Valik, 17 years ago

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.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.