AcecoolAHK_Framework - Drag&Drop files or exes& my framework loads them for you without need to #include / run manually!
Posted: 15 Dec 2016, 07:07
https://bitbucket.org/Acecool/acecoolah ... k/overview
This framework is for those of us that want a single environment for multiple scripts, or a way to launch all of our favorite scripts at the click of 1 button... In short you can drag and drop files into the designated folders in the AcecoolAHK_Framework\ directory and when you run AutoHotkey.exe ( which runs Documents\AutoHotkey.ahk )[ you will have had to previously run _assets\_setup\setup.bat in administrator mode for it to generate the Documents\AutoHotkey.ahk file and symbolically linked AcecoolAHK_Framework\libraries to AHK_INSTALL_PATH\Lib ] or framework_launcher.ahk everything will be loaded, dynamically, for you... Simply drag and drop...
It is a simple way to run all of your individual scripts as individually run ahk instances, or for them all to be included under one "banner" / tray-icon ( or a mix of both ).. You can even launch your favorite executables automatically when you launch the framework... ie: Instead of needing to run each script individually or add an include line in your includer file - everything is handled for you.. simply drag'n'drop...
A run-down of what each folder is used for:
I hope this clears things up and makes it easier to understand what it is for ( I will be adding a lot of my own scripts to this such as an application monitor which restarts anything if not running / hung / etc.. and a window management system which is set up like scenes so if all windows are open, they're moved to your preset position so your work-area is always how you want it... and more.. )... Please give it a try and let me know what you think. https://bitbucket.org/Acecool/acecoolah ... k/overview
Planned: https://bitbucket.org/Acecool/acecoolah ... tatus=open - and more...
This framework is for those of us that want a single environment for multiple scripts, or a way to launch all of our favorite scripts at the click of 1 button... In short you can drag and drop files into the designated folders in the AcecoolAHK_Framework\ directory and when you run AutoHotkey.exe ( which runs Documents\AutoHotkey.ahk )[ you will have had to previously run _assets\_setup\setup.bat in administrator mode for it to generate the Documents\AutoHotkey.ahk file and symbolically linked AcecoolAHK_Framework\libraries to AHK_INSTALL_PATH\Lib ] or framework_launcher.ahk everything will be loaded, dynamically, for you... Simply drag and drop...
It is a simple way to run all of your individual scripts as individually run ahk instances, or for them all to be included under one "banner" / tray-icon ( or a mix of both ).. You can even launch your favorite executables automatically when you launch the framework... ie: Instead of needing to run each script individually or add an include line in your includer file - everything is handled for you.. simply drag'n'drop...
A run-down of what each folder is used for:
- AcecoolAHK_Framework\_assets\ is an "internal" folder and you'll not likely need to do anything in here other than the initial _setup\setup.bat as admin on each new PC you install this on. You can look at the auto generated files in __load_order_files__\ and change the default template, pre include template section and post include template section from within templates\ ( which simply lets you add your own config, etc.. - I will eventually remove my config from the autoloader\run_framework_base.ahk and move it into the templates folder to make it easier to control.. )
- AcecoolAHK_Framework\addons_exe\ is a special folder whereby each file you place in here is executed in its own instance similarly to addons_run\ except you can use executables and other "dangerous" file-types in here ( By default and each time you rebuild the inclusion list you'll be asked which files you want to allow -- I will alter this system so once you allow the exe, a hash entry will be made into the configuration file or registry so that you won't have to authorize that file ever again - at least not until it updates / changes ).
- AcecoolAHK_Framework\addons_run\ All scripts in here are executed as their own AutoHotkey instance; exactly as if you double-clicked each one individually each time the framework loads / is reloaded... I'd recommend forcing single-instance so when you Reload This Script under the Framework Tray Icon, each of these will be reloaded too..
- AcecoolAHK_Framework\addons_inc\ All scripts in here are INCLUDED into the framework - Useful if it is a small script that doesn't need a tray icon, or anything else special ( such as https://autohotkey.com/boards/viewtopic.php?f=6&t=8963 - display mouse ripple effect when you click mouse buttons or control )
- AcecoolAHK_Framework\classes\ contains all libraries / classes / etc.. which should be included with the framework - I included a few by default from myself and from others such as Julian Date function by SKAN in order to create a timestamp since Epoch, a math library which moves all math functions into it to make code look cleaner and I added a few helpful math functions too, time library to simplify input / output of time and timestamps, and a configuration library for controlling config.ini ( configuration.SetDefaultValue will only set a key / value if it doesn't exist / configuration.Read/SetValue will read or write a key / value from / to config.ini regardless of whether it exists or not.. On read, if it doesn't exist what is returned is a string: KEY_NOT_FOUND
- AcecoolAHK_Framework\definitions\ is a folder where you can add your global variables, ENUMeration, CONSTants, etc... This is one of the first inclusion directories and it won't be blocked from running basic code ( and it should be kept this way )
- AcecoolAHK_Framework\functions\ is a folder where you can put standalone functions which are used in more than one script but there aren't enough of them to create a library for ( I will make a library for all of the string functions, and there will be more, but for now there is String_Safe there and String_Repeat somewhere )
- AcecoolAHK_Framework\hotkeys\ folder is used for basic hotkey definitions..
- AcecoolAHK_Framework\libraries\ is symbolically linked from AHK_INSTALL_PATH\Lib\ - this is where all of your #include <xxx> files go...
- AcecoolAHK_Framework\processes\ is an extra folder where you can place your stand-alone scripts ( or ones that need to piggyback off the framework for functions / config / etc.. ) which are called by a hotkey... For example hotkeys\hotkey_screencapture_current_window__alt_f12.ahk calls processes\process_screenshot_win_and_notification.ahk which captures a screenshot of the active window, creates a clickable toast notification letting you know where it is and the name. On click it will ask if you want to make the screenshot public. If yes or no the screenshot is opened. If yes then the screenshot is moved to your public screenshots directory ( you pick both private and public inside of config.ini ) and a share-link is copied to your clipboard ( if you use DropBox and if you entered your userid in config.ini - note: if you don't use dropbox I will be working on a solution for you soon )...
I hope this clears things up and makes it easier to understand what it is for ( I will be adding a lot of my own scripts to this such as an application monitor which restarts anything if not running / hung / etc.. and a window management system which is set up like scenes so if all windows are open, they're moved to your preset position so your work-area is always how you want it... and more.. )... Please give it a try and let me know what you think. https://bitbucket.org/Acecool/acecoolah ... k/overview
Planned: https://bitbucket.org/Acecool/acecoolah ... tatus=open - and more...