Image einbinden

  • Hallo
    ich wollte fragen wie ich eine JPG datei in mein Script einbinden kann,
    also als hintergrund für GUI.
    Wollte es mit GUICtrlCreatePic machen, jedoch speichert er das image nich in der exe.
    Somit muss das bild mit verschickt werden.
    Geht das, dass man es mit compiled oder das man die JPG von einer url nimmt?

    MfG

  • Auszug aus der AutoIT Hilfe

    Function FileInstallInclude and install a file with the compiled script.

    [autoit]

    FileInstall ( "source", "dest" [, flag] )

    [/autoit]


    Parameters
    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). dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable. flag [optional] this flag determines whether to overwrite files if they already exist:
    0 = (default) do not overwrite existing files
    1 = overwrite existing files

    Return Value
    Success: Returns 1. Failure: Returns 0.

    Remarks
    The FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script if the statement is executed. Keep in mind that files such as images can greatly increase the size of a compiled script.
    The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards.

    When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).
    Files maintain their original creation/modification timestamps when installed.

  • Auszug aus der AutoIT Hilfe

    Ein Link hätte es auch getan, oder ?

    Zur Nutzung dieses Forum's, ist ein Übersetzer für folgende Begriffe unerlässlich:

    "On-Bort, weier, verscheiden, schädliges, Butten steyling, näckstet, Parr, Porblem, scripe, Kompletenz, harken, manuel zu extramieren, geckukt, würglich, excell, acces oder Compilevorgeng"

  • Ja das funktioniert mir FileInstall. Somit muß das Image nur per Pfad eingebunden werden. Beim ausführen der EXE-Datei wird das Image in einem Ordner deiner Wahl abgelegt.

    Ein kleiner Tipp:
    Das File würde ich unter @TempDir ablegen und natürlich mit FileDelete wieder löschen.

    MfG
    Der_Doc