aommaster Posted December 27, 2008 Share Posted December 27, 2008 Hi everyone Can global variables, such as @scriptdir or @desktop be used in the fileinstall function? If not, how do I get around this problem when I want to install files at the user's desktop location? Link to comment Share on other sites More sharing options...
Andreik Posted December 27, 2008 Share Posted December 27, 2008 Hi everyoneCan global variables, such as @scriptdir or @desktop be used in the fileinstall function?If not, how do I get around this problem when I want to install files at the user's desktop location?@ScriptDir and @DesktopDir are directory macros. You can use it as destination but you cannot use as source. This must be a literal string; it cannot be a variable. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
aommaster Posted December 27, 2008 Author Share Posted December 27, 2008 That's interesting.. I managed to use the @scriptdir for the output, which is fine. However, it doesn't seem to extract files one folder deeper (these files are bitmap images). Is there a reason for this? Link to comment Share on other sites More sharing options...
Andreik Posted December 27, 2008 Share Posted December 27, 2008 That's interesting.. I managed to use the @scriptdir for the output, which is fine. However, it doesn't seem to extract files one folder deeper (these files are bitmap images). Is there a reason for this?Should not be a problem.Post the code and then we can help you more. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
aommaster Posted December 27, 2008 Author Share Posted December 27, 2008 fileinstall("C:\Users\USERNAME\Desktop\BC Program\bmp\code.bmp",@scriptdir & "\bmp\code.bmp") fileinstall("C:\Users\USERNAME\Desktop\BC Program\start.txt",@scriptdir & "\start.txt") The second line seems to work. It extracts start.txt just fine. Doesn't seem to work for the bitmaps, which is the first line of the code above. Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 27, 2008 Share Posted December 27, 2008 (edited) if you go fileinstall("C:\Users\USERNAME\Desktop\BC Program\bmp\code.bmp",@scriptdir & "\code.bmp") does that work? or maybe try fileinstall("C:\Users\USERNAME\Desktop\BC Program\start.txt",@scriptdir & "\start.txt")dircreate(@scriptdir & '\bmp\) fileinstall("C:\Users\USERNAME\Desktop\BC Program\bmp\code.bmp",@scriptdir & "\bmp\code.bmp") *NOT TESTED* Edited December 27, 2008 by bob00037 [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
aommaster Posted December 27, 2008 Author Share Posted December 27, 2008 I think I've confused myself with that this function does. My belief: It integrates the relevant files into the compiled program, and when the program is run, extracts the compiled files to the relevant folder. However, now that I look at it, I don't think it does the above. I think that it integrates the relevant files once the program is run, and should the original files be deleted, recreates them. So does someone mind shining some light on what this function exactly does? Because something tells me that this is not the function for me. Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 27, 2008 Share Posted December 27, 2008 idk lol im wanting this EXACT .bmp fileinstall (i cant do it) I THINK that it just coopies the foulder cause whenever i fileinstall any pics it doesnt do anything at all [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 27, 2008 Share Posted December 27, 2008 and congrats on your 100th post [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Zedna Posted December 27, 2008 Share Posted December 27, 2008 I think I've confused myself with that this function does. You probably must create not existing out directory first as bob said: dircreate(@scriptdir & '\bmp\) Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
aommaster Posted December 27, 2008 Author Share Posted December 27, 2008 Aha... that was it indeed. Thanks everyone! Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 27, 2008 Share Posted December 27, 2008 no problemo lol, what did u do to load the .bmp did you fileinstall() it THEN make exe, and did this work on a seperate computer OR did you fileinstall()it and make the .bmp a binary? OR did you fileinstall() it and copy from one dir to another... lol i dont understand fileinstall [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
aommaster Posted December 27, 2008 Author Share Posted December 27, 2008 My initial understanding of fileinstall was correct.File install allows you to literally store the relevant files in the compiled script. You need to provide the file path to the relevant file, and once your program is compiled, you can delete those files and your program will still run given that you recreate the files in the same spot, and what-not.The mistake I was making was that I hadn't created the relevant folder for fileinstall to work, and since fileinstall cannot create folders, the files weren't copied, and hence, my problem. Link to comment Share on other sites More sharing options...
HeidiR Posted January 8, 2009 Share Posted January 8, 2009 Hi everyoneCan global variables, such as @scriptdir or @desktop be used in the fileinstall function?If not, how do I get around this problem when I want to install files at the user's desktop location?I have provided 3 fully commented examples on FileInstall on my site at the link below. Hope this helps. HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now