Sign in to follow this  
Followers 0
layer

FileInstall

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

yes, it does :) the @ScriptDir is where the script is, correct? and in that dir, i have an images folder with all my images in it :D suggestions?


FootbaG

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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]

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0