Jump to content

FileInstall


 Share

Recommended Posts

ok.. i need to fileinstall a few things, and when i compile it, with the pictures in the right directory and everything, and when i compile it, the pictures do not install :D heres what i got:

If NOT FileExists(@ScriptDir & "\Images\edit.bmp") then FileInstall("C:\Images\edit.bmp", @ScriptDir & "\Images\edit.bmp")
If NOT FileExists(@ScriptDir & "\Images\input.bmp") then FileInstall("C:\Images\input.bmp", @ScriptDir & "\Images\input.bmp")
If NOT FileExists(@ScriptDir & "\Images\eradio.bmp") then FileInstall("C:\Images\radio.bmp", @ScriptDir & "\Images\radio.bmp")
If NOT FileExists(@ScriptDir & "\Images\checkbox.bmp") then FileInstall("C:\Images\checkbox.bmp", @ScriptDir & "\Images\checkbox.bmp")
If NOT FileExists(@ScriptDir & "\Images\button.bmp") then FileInstall("C:\Images\button.bmp", @ScriptDir & "\Images\button.bmp")
If NOT FileExists(@ScriptDir & "\Images\marquee.bmp") then FileInstall("C:\Images\marquee.bmp", @ScriptDir & "\Images\marquee.bmp")
If NOT FileExists(@ScriptDir & "\Images\paragraph.bmp") then FileInstall("C:\Images\paragraph.bmp", @ScriptDir & "\Images\paragraph.bmp")
If NOT FileExists(@ScriptDir & "\Images\msgbox.bmp") then FileInstall("C:\Images\msgbox.bmp", @ScriptDir & "\Images\msgbox.bmp")
If NOT FileExists(@ScriptDir & "\Images\text.bmp") then FileInstall("C:\Images\text.bmp", @ScriptDir & "\Images\text.bmp")
If NOT FileExists(@ScriptDir & "\Images\picture.bmp") then FileInstall("C:\Images\picture.bmp", @ScriptDir & "\Images\picture.bmp")
If NOT FileExists(@ScriptDir & "\Images\cwebpage.dll") then FileInstall("C:\cwebpage.dll", @ScriptDir & "\cwebpage.dll")

i get no errors, its just the pictures dont install :) could someone clear this up for me (fileinstall theory)? because whenever i use fileinstall i always get these troubles, id like to be able to NOT have to always ask for help just for this.. thanks :D

FootbaG
Link to comment
Share on other sites

  • Developers

ok.. i need to fileinstall a few things, and when i compile it, with the pictures in the right directory and everything, and when i compile it, the pictures do not install  :D heres what i got:

i get no errors, its just the pictures dont install  :) could someone clear this up for me (fileinstall theory)? because whenever i use fileinstall i always get these troubles, id like to be able to NOT have to always ask for help just for this.. thanks :D

<{POST_SNAPBACK}>

Does the @ScriptDir & "\Images" directory exist ? if not you want to create the directory first. Edited by JdeB

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

You might have to DirCreate ( @ScriptDir & "\Images" ) for it to install them.

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

You might have to DirCreate ( @ScriptDir & "\Images" ) for it to install them.

<{POST_SNAPBACK}>

no :( i dont think so, i just tested that out with a test dir, and it creates the dir, but theres no reason for it when the dir is already there! :D:):D

any more suggestions welcome.. :huh:

thanks for the support

FootbaG
Link to comment
Share on other sites

no :( i dont think so, i just tested that out with a test dir, and it creates the dir, but theres no reason for it when the dir is already there! :D  :)  :D

any more suggestions welcome.. :huh:

thanks for the support

<{POST_SNAPBACK}>

Had the same problem, i solved it like this

If Not FileExists(@ScriptDir & "\Sounds\online.wav") Then   
    FileInstall("online.wav", @ScriptDir & "\")
    DirCreate(@ScriptDir & "\Sounds")
    FileMove(@ScriptDir & "\online.wav",@ScriptDir & "\Sounds\online.wav")
EndIf
Link to comment
Share on other sites

Had the same problem, i solved it like this

If Not FileExists(@ScriptDir & "\Sounds\online.wav") Then    
    FileInstall("online.wav", @ScriptDir & "\")
    DirCreate(@ScriptDir & "\Sounds")
    FileMove(@ScriptDir & "\online.wav",@ScriptDir & "\Sounds\online.wav")
EndIf

<{POST_SNAPBACK}>

Tumbleweed, it works! did anyone ever tell you how cool you are!!! :( YOU just made my DAY! :( thanks a million, really!!! :):D:D

maybe this is a bug though? :(

EDIT: maybe it's not a bug, because it says "FILEINSTALL" and not DirInstall :( still, thanks you very much! :( so this means Xenogis was right too! :huh: hehe :D

Edited by layer
FootbaG
Link to comment
Share on other sites

FYI: No need to use FileMove()

If Not FileExists(@ScriptDir & "\Sounds\online.wav") Then
    DirCreate(@ScriptDir & "\Sounds")
    FileInstall("online.wav", @ScriptDir & "\Sounds\online.wav")
EndIf

Edit:Added folder reference to code.

Edited by MHz
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...