Followers 0

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 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\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

FootbaG

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  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

<{POST_SNAPBACK}>

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

Live for the present,
Dream of the future,
Learn from the past.

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 suggestions?

FootbaG

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 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!

any more suggestions welcome..

thanks for the support

FootbaG

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!

any more suggestions welcome..

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 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!!!

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! hehe

Edited by layer

FootbaG

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

Edited by MHz