narayanjr Posted June 16, 2007 Share Posted June 16, 2007 (edited) #include "C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl" #include "C:\Program Files\ArW-Pikid\NewTbls\string.tbl" <-- is line 11 #include "C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl" If Not FileExists("C:\Program Files\Diablo II\data\" Then DirCreate("C:\Program Files\Diablo II\data\local\LNG\ENG\") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\expansionstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\string.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\string.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\patchstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl", "C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\string.tbl", "C:\Program Files\ArW-Pikid\NewTbls\string.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl", "C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl") ElseIf FileExists("C:\Program Files\Diablo II\data\" Then If FileExists("C:\Program Files\Diablo II\data\local\LNG\ENG\expansionstring.tbl") Then If FileExists("C:\Program Files\Diablo II\data\local\LNG\ENG\string.tbl") Then If FileExists("C:\Program Files\Diablo II\data\local\LNG\ENG\patchstring.tbl") Then FileMove("C:\Program Files\Diablo II\data\local\LNG\ENG\expansionstring.tbl", "C:\Program Files\ArW-Pikid\OldTbls\") FileMove("C:\Program Files\Diablo II\data\local\LNG\ENG\string.tbl", "C:\Program Files\ArW-Pikid\OldTbls\") FileMove("C:\Program Files\Diablo II\data\local\LNG\ENG\patchstring.tbl", "C:\Program Files\ArW-Pikid\OldTbls\") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\expansionstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\string.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\string.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl", "C:\Program Files\Diablo II\data\local\LNG\ENG\patchstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl", "C:\Program Files\ArW-Pikid\NewTbls\expansionstring.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\string.tbl", "C:\Program Files\ArW-Pikid\NewTbls\string.tbl") FileInstall("C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl", "C:\Program Files\ArW-Pikid\NewTbls\patchstring.tbl") EndIf EndIf EndIf EndIfi keep getting this error, I need it to check to see if the folder data exists and if it does then move the files in data\local\lng\eng\ to ArW-Pikid\OldTbls\But if the Folder data does not exist then i want it to make that folder and put the files into data\local\lng\eng\And no matter what i want it to add the files to ArW-Pikid\NewTbls\This is my first time using #include and FileInstall so i could have done everything wrong, Thanks for any help(There is more to the script but it all worked until i started messing with what i included at the top) Edited June 16, 2007 by narayanjr Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 16, 2007 Share Posted June 16, 2007 (edited) dont include the install files. including basically adds that file to your script before compiling. so if you had: test1.au3 Func install() blah EndFunc oÝ÷ Ú׬·f®Ý«¢+Ø(¥¹±Õ±ÐíÑÍÐĹÔÌÐì)Õ¹¥¹Íѱ°È ¤)± )¹Õ¹oÝ÷ Ú׬·g±{ .ÖÞr©Wjw[y«¢+Ø)Õ¹¥¹Íѱ° ¤)± )¹Õ()Õ¹¥¹Íѱ°È ¤)± )¹Õ¹( can you include anythign other than .au3 files? Edited June 16, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
narayanjr Posted June 16, 2007 Author Share Posted June 16, 2007 no idea but that worked perfectly thank you Link to comment Share on other sites More sharing options...
Generator Posted June 16, 2007 Share Posted June 16, 2007 (edited) #Include Func basically includes all the code that you have in your included .au3. So you don't have to keep using the same code over and over again. Example: If you want this func in your program. Include file: Func _ComplexFunc() ;Lots ;Of ;Lines ;Here ;Return Code EndFunc oÝ÷ Ù.®è¶¦±Êâ¦Ö®¶s`¤bô6ö×ÆWgVæ2FVà Edited June 16, 2007 by Generator Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2007 Share Posted June 16, 2007 Read the help file on these commands. You've already gotten several explanations of #include. FileInstall() creates a compressed copy of the specified file inside the compiled script at compile time (when you hit F7 in SciTE and create the .exe). Then, when you run the script, the file gets uncompressed and copied to the location specified. Both operations are accomplished by the one instance of FileInstall() in the script, so you don't have to "include" the file before "installing" it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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