Ok, here's another post related to one of my
previous question about quitting an AHK script from within another script. It aimed at an idea about some kind of plugin system for BBCodeWriter.
Goyyah's rainbow text and he personally himself brought me to this idea.
Let's get into detail about this idea as how far I thought about it.
I thought about creating another submenu (PlugIns) within the main menubar which is filled upon startup. BBCodeWriter should loop through the plugins subfolder within the script's directory and pick all .ahk scripts in order to import it as an entry to the mentioned plugin menu.
I also thought about some kind of defined format for these PlugIn scripts. E.g. it would be good if the script provides it's own hotkey keys with which it could be called from within the main script by using the hotkey command. So we would need a variable defined which holds the key values for this.
- The first idea of a Plugin script is the already mentioned rainbow text script by Goyyah extended by the color fade option (stay within one color) also mentioned in the concerning thread. Using the specified hotkey within the script will call a small GUI that lets you enter your text and decide whether you want a rainbow or a color faded text.
- A second idea raised after reading about the new forum improvements. The forum now supports color formatting within code tags. So I thought about some simple syntaxhighlighter for Autohotkey code that will color up the code by looking for keywords. Maybe these keywords can be extracted from any of these textfiles provided within the "extra" folder within the Autohotkey install folder.
As these PlugIn scripts should be loaded together with the main script they shouldn't have any tray icon. So I'm looking for a way to exit these plugin scripts when exiting the main script. Otherwise these plugins would still be in effect and a user wouldn't even notice that these scripts are running apart from checking the taskmanager.
In the previous thread SendMessage in combination with the OnExit label was proposed as a possible solution. As I'm relatively new to all this WM_Messages thingie I'm asking myself what message should be sent and how. Does anybody maybe have a short example script that closes another script with the help of SendMessage?
Is SendMessage the proper way to solve this problem or do you see a better solution to get some kind of plugin system?
I hope you don't think I'm expecting full working code or someone who does the work for me. I just want avoid going into the wrong direction with the concept and discover afterwards that I can't solve the problem with it. On the other hand I'm looking for additional ideas to sharpen the concept. Maybe anyone of you has some brilliant ideas about this which I haven't thought about yet.
Put in a nutshell, I'm looking for a solution that lets a user modify its own BBCodeWriter installation with plugins that can expand its possibilities without changing the main script because these "possibilites" aren't needed by all users.
_________________
Cheers
AGU