This script provide interface to 2 functions - Join and Unjoin
Join function will join includes of an ahk source file into the script containing no includes.
File will be saved in the directory of original file with the name OriginalName _J_.ahk
Unjoin will return previously joined script to its previous file system hierarchy
This script is to be used with complex projects containing one ore more includes. While developing, its often desired to split projects into modules for organization and maintaince reasons. However, sometimes developer wants to provide single include to users of his module but keep his developing organization.
This script makes possible to join main script file with its includes thus making single .ahk file with no includes that is ready for distribution. Later anybody can recreate original file system structure from the previously joined file. This allows everybody to use original environment if there is a need for further development of the project or bug fixing with original structure in the place.
- Join function doesn't recognize 3 AHK variables allowed to use in #include (A_ScriptDir, A_AppData, A_AppDataCommon). Generaly, there is no need to use those variables anyway.
- Unjoining script will recreate original file system structure. If there are already files with the names like those that are to be created, the new contest will be appended as FileAppend is used to create files. In final version, function will probably abort in such situations.
- Files merged with Join function will have _J_ suffix in its name. Its good to leave this at the place so everybody can know from the scripts name if it can be unjoined. If _J_ is not present, the only way to check if script is joined is to check for its GUID, using Search function of your editor. Search for the unquoted string "B1AD529B-BF4E-477F-8B9F-3080CAC55AE3"
- ScriptMerger is interface to Join and Unjoin functions that you can find in the script. You can use those functions for your own needs. They are documented in the source code.
This is the output for Favmenu 3 script join operation and BBCodeWriter unjoin operation (using main _J_.ahk file previously created with Join function)