JScript Posted September 2, 2011 Share Posted September 2, 2011 (edited) CreateFilesEmbedded.exeApplication to embed files into their programs in the format .AU3I present a different format to add files in your script:So how about having our files (photos, text, executables) built?1 - We can use the binary variables with2 - We can test the fully functional program with F5 SciTE4 - Use your imagination!!!Sintax / Examples:#include "YourFileEmbedded.au3" ; Returning the code in binary format $bData = _YourFileEmbedded() ; Saving the code in the HDD _YourFileEmbedded( True, @ScriptDir) ; Saving and running the code _YourFileEmbedded( True, @ScriptDir, True) ; Finally, running the code directly Run(_YourFileEmbedded(True))Language file sample:; #INDEX# ======================================================================================================================= ; Title .........: CreateFilesEmbedded™ ; Module ........: Language ; Author ........: Reaper HGN ; Link ..........: http://www.autoitscript.com/forum/topic/132564-createfilesembeddedau3-like-fileinstall/#entry930932 ; Language ......: English (United States) ; =============================================================================================================================== [0409] 1 = Options for the output file. 2 = Create a function based on the output name. 3 = Adding patterns of User Defined Functions (UDF). 4 = Only create the output file with the binary. 5 = Adding native LZNT Windows compression. 6 = Compression level 7 = &Open File 8 = Embedding file 9 = Test 10 = Default 11 = Progress of conversion: 12 = Exit 13 = Converted Lines 14 = Choose a file to embed 15 = The file 16 = no exist! 17 = 'The test only with the option: "Create a function based on the output name" activated!' 18 = Wait, creating the file. AU3 -> 19 = Save the file as built 20 = Compressing the file, wait... 21 = Done! 22 = The file 23 = was embedded in the format .AU3!Supports:; All file types!Downloads:Version: 2.27CreateFilesEmbedded_(RedirectLink).html(Previous downloads: 575)Example using the binary return (without writing the file in HDD)BinarySoundTest.zipSample:Fixes:2.27.0912.260027/09/2012 -> Some bugs fixed and added multi-language support!1.15.0911.2600b02/09/2011 -> First release!Free SoftwareRedistribute and change under these terms:1 - This program is free software: you can redistribute it and / or modify it under the terms of the GNU General Public License As published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.2 - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.3 - You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses.João Carlos. Edited September 28, 2012 by Melba23 File removed at JScript's request http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Skitty Posted September 11, 2011 Share Posted September 11, 2011 (edited) Well, Portuguese is a lot like my native language, I was surprised when I actually understood everything in that language, I didn't know it was so similar to Spanish. CreateFilesEmbedded.au3 Edited September 11, 2011 by THAT1ANONYMOUSEDUDE Link to comment Share on other sites More sharing options...
JScript Posted September 12, 2011 Author Share Posted September 12, 2011 @THAT1ANONYMOUSEDUDEMuchas gracias!¡Tienes razón! És muy parecida...Thank you very much!You're right! Is very similarJoão Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted September 12, 2011 Share Posted September 12, 2011 @THAT1ANONYMOUSEDUDEMuchas gracias!¡Tienes razón! És muy parecida...Thank you very much!You're right! Is very similarJoão Carlos.muchas? zomg i love muchas! corn chips, salsa, melted cheese, tomato...what more could you want in a food? ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
JScript Posted September 13, 2011 Author Share Posted September 13, 2011 @twitchyliquid64 Funny, but the topic is about scripts, not food! João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
SandelPerieanu Posted September 13, 2011 Share Posted September 13, 2011 i tested with the same file With FileInstall - 3.87 Mb With CreateFilesEmbedded.au3 - 6.70 Mb (- LZNT level 2) for me it's not ok. thanks. Link to comment Share on other sites More sharing options...
JScript Posted September 14, 2011 Author Share Posted September 14, 2011 (edited) @SandelPerieanu Very strange, see this example:Download: Test_(Embedded&FileInstall).zip Test_(Embedded).au3#AutoIt3Wrapper_Compression=4 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=y ;(Y/N) Compress output program. Default=Y #include "Zune.au3" ; 970KB, LZNT level 2 _Zune(True, @TempDir)Test_(Embedded).exe = 978KB Test_(FileInstall).au3#AutoIt3Wrapper_Compression=4 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=y ;(Y/N) Compress output program. Default=Y FileInstall(".Zune.msstyles", @TempDir) ; 12.028KBTest_(FileInstall).exe = 1.736KB Conclusion: Who is smaller? João Carlos. Edited September 14, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
JFX Posted September 14, 2011 Share Posted September 14, 2011 Conclusion: Who is smaller? it depends on how "compress able" a file is. AutoIt uses a very week compression for script and fileinstall, but it stores it better.Your function compresses much better, but stores not efficient (Hex values not binary) Anyway thank you very much for this script. Link to comment Share on other sites More sharing options...
JScript Posted September 14, 2011 Author Share Posted September 14, 2011 (edited) @JFX You're right! I'll see what I can do to improve it... Do you have any idea? I was thinking of store in resource... João Calos. Edited September 14, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
JFX Posted September 14, 2011 Share Posted September 14, 2011 hmm, store in resource would be a very good solution for complied scripts. for not complied it could be Base64 encoded, like in some other script (ex. AutoitObject) Link to comment Share on other sites More sharing options...
JScript Posted September 14, 2011 Author Share Posted September 14, 2011 (edited) Base64 encoded?!?! It's better than in Hex format? Could you give me an example? João Carlos. Edited September 14, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
trancexx Posted September 14, 2011 Share Posted September 14, 2011 hmm, store in resource would be a very good solution for complied scripts.for not complied it could be Base64 encoded, like in some other script (ex. AutoitObject)Excellent observation. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JFX Posted September 15, 2011 Share Posted September 15, 2011 @jscriptYes Base64 is a better choice then Hex format. It just need 4 Bytes to save 3 Bytes binary dataSee here or @trancexxThanks. It's a pleasure to read such excellent scripts Link to comment Share on other sites More sharing options...
JScript Posted September 15, 2011 Author Share Posted September 15, 2011 @JFX, OK, you have convinced me, updated code! João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Reaper HGN Posted October 3, 2011 Share Posted October 3, 2011 (edited) I wanted to try this out, but wasnt sure about what the options and text was saying. I saw that you needed some translation, so I played around with the translate in Google. I copied your text into a language file and created a select based on your OSLang return value. I only did the original Portuguese and the additional English (You may want to do it a different way). Anyway, I modified the original file slightly to use all the variables that are setup in the language file. Now I can check it out and see if it work for me Attaching filesCreateFilesEmbedded.au3language.au3 Edited October 3, 2011 by Reaper HGN Link to comment Share on other sites More sharing options...
JScript Posted October 4, 2011 Author Share Posted October 4, 2011 @Reaper HGN Many thanks guy! I'm doing a new version, then I'll include multilanguage support... João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
RugWarrior Posted November 15, 2011 Share Posted November 15, 2011 Great UDF! Can't wait for the new version Link to comment Share on other sites More sharing options...
RugWarrior Posted November 15, 2011 Share Posted November 15, 2011 Hi, I played around with the translation file as you will not get something on the screen to read if your system has another language set (like german). Hopefully I will have same spare time during the next couple of days I will translate it to german also. Greetings RW expandcollapse popup#include ".\Include\_GetOSLangString.au3" $SysLang = _GetOSLangString(@OSLang) Global $a_language[24] If StringInStr($SysLang, "Portuguese", False) Then $a_language[1] = "Opções do arquivo de saída." $a_language[2] = "Criar uma função baseada no nome de saída." $a_language[3] = "Adicionar padrões de Funções Definidas pelo Usuário (UDF)." $a_language[4] = "Apenas criar o arquivo de saída com o binário." $a_language[5] = "Adicionar compressão LZNT nativa do Windows." $a_language[6] = "Nível de compressão:" $a_language[7] = "&Abrir arquivo" $a_language[8] = "Embutir arquivo" $a_language[9] = "Testar" $a_language[10] = "Padrão" $a_language[11] = "Progresso de conversão:" $a_language[12] = "Sair" $a_language[13] = "Linhas convertidas:" $a_language[14] = "Escolha um arquivo para embutir:" $a_language[15] = "O arquivo " $a_language[16] = " não existe!" $a_language[17] = 'O teste somente com a opção: "Criar uma função baseada no nome de saída" ativada!' $a_language[18] = "Aguarde, criando o arquivo .AU3 -> " $a_language[19] = "Salvar o arquivo embutido como" $a_language[20] = "Compactando o arquivo, aguarde..." $a_language[21] = " - Concluído!" $a_language[22] = 'O arquivo "' $a_language[23] = '" foi embutido para au3.' Else ;"English" $a_language[1] = "Options for the output file." $a_language[2] = "Create a function based on the output name." $a_language[3] = "Adding patterns of User Defined Functions (UDF)." $a_language[4] = "Only create the output file with the binary." $a_language[5] = "Adding compression LZNT native Windows." $a_language[6] = "Compression level" $a_language[7] = "&Open File" $a_language[8] = "Embedding file" $a_language[9] = "Test" $a_language[10] = "Standard" $a_language[11] = "Progress of conversion:" $a_language[12] = "Exit" $a_language[13] = "Converted Lines" $a_language[14] = "Choose a file to embed" $a_language[15] = "File" $a_language[16] = "No!" $a_language[17] = 'The test only with the option: "Create a function based on the output name" activated!' $a_language[18] = "Wait, creating the file. AU3 equipment ->" $a_language[19] = "Save the file as built" $a_language[20] = "Compressing the file, wait ..." $a_language[21] = "- Done!" $a_language[22] = 'File" ' $a_language[23] = '"AU3 equipment was built for."' EndIf Link to comment Share on other sites More sharing options...
Belini Posted January 8, 2012 Share Posted January 8, 2012 (edited) Tested and approved, much better than FileInstall () thanks for sharing. Edited January 9, 2012 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
JScript Posted January 8, 2012 Author Share Posted January 8, 2012 Hi @Belini I'm doing a few more changes and then post here and in the Brazilian forum, thank you very much! Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! 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