Jump to content

FileInstall Path?


Recommended Posts

This is taken right out of the helpfile

source The source path of the file to compile. This must be a literal string; it cannot be a variable. It can be a relative path (using .\ or ..\ in the path).

so by "This must be a literal string;it cannot be a variable." does that mean I can't use @macros such as @ScriptDir , @HomeDrive?

Link to comment
Share on other sites

  • Developers

This is taken right out of the helpfile

source The source path of the file to compile. This must be a literal string; it cannot be a variable. It can be a relative path (using .\ or ..\ in the path).

so by "This must be a literal string;it cannot be a variable." does that mean I can't use @macros such as @ScriptDir , @HomeDrive?

Correct, no variables for the simple fact that the source info is used at Compilation time at which time these variables&macro do not contain any proper value.

Jos

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.
  :)

Link to comment
Share on other sites

Correct, no variables for the simple fact that the source info is used at Compilation time at which time these variables&macro do not contain any proper value.

Jos

Thanks for clearing that up, but this creates a problem because what if I wanted to install a file into the @HomeDrive.

If I did it this way would this work... create all my files I want to install in to binary and write the file in a sub script and than include it into the main script this way the main script doesn't have 5000+ lines and is easy to work with.

MyPicture.au3 (Sub Script)

$File="0x"
    $File &= "FFD8FFE000104A46494600010101006000600000FFE10016457869660000"
    $File &= "4D4D002A00000008000000000000FFDB0043000101010101010101010101"
    $File &= "010101010101010101010101010101010101010101010101010101010101"
    ...Continue 
    FileWrite(@HomeDrive & "\Test.jpg" , $File)

Main (Main Script)

#include <MyPicture.au3> ;INCLUDE SUB SCRIPT
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

GUICreate("Form1", 200, 200)
GUICtrlCreatePic(@HomeDrive & "\Test.jpg", 0, 0, 200, 200)
GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I hope you understand what I mean :) (I could test this method but if I sent it to my friend I don't want it to end up not working)

Link to comment
Share on other sites

  • Developers

Thanks for clearing that up, but this creates a problem because what if I wanted to install a file into the @HomeDrive.

Install into is the target file and has nothing to do with the source file.

Target file can contain variables as that is done at runtime.

Jos

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.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...