penpen wrote:You should reread the second link (and your post in that topic above).Adrianvdh wrote:Oh yeah...
But those are names of languages you know right? I want to know the programming languages you can code in.The first line is a mapping from the pluginable functions to the indices of the next mapping.Adrianvdh wrote:Code: Select all
set "PluginFunctions[Pluginable1]=2"
:: ...
set "PluginFunctions[1]=call :Pluginable3"
The last line is a mapping from pluginable functions indices to the command to call them; without params, as they are added later in code.This is an option to not load any plugins.Adrianvdh wrote:Code: Select all
:processParams
if /I .%1 == ./noPlugins set "usePlugins=false"
goto :pluginManagerIn batch the most datatypes are all simulated, so you can see it as a list or as an array, as you want or need it.Adrianvdh wrote:(... code)
I know this but to make sure... The plugin manager contains all the plugins batch file within the 'plugins' folder and stores the names in an array or a list I forget the differences. (I am still learning C# but I am also leaning Java at school, just starting)
The only datatype batch supports is a hash map on strings (key and value): The key is the name of the variabel (and the value is its value).1. YesAdrianvdh wrote:(... code)
calls the services(s) used by 'main.bat'
(... code)
The "callfunction" is used to call function(s) within plugins to be replaced by the default function(s)
(... code)
These are the functions built into the main batch file.
e.g. 'getWinkey'
2. I'm sure you mean it in right way.
3. I thought this was your example of a function called from the plugin; if yes, then: No, it should be placed within the batch-dll.This should be just the simulating of a complex program, but it is much more easier:Adrianvdh wrote:Code: Select all
:mainlabel
echo =================================================================
::2
::3
::4
call :callfunction :Pluginable1, mainlabel 5 n
echo =================================================================
:default
::1
call :callfunction :Pluginable2, default 2 n
echo =================================================================
:settings
::1
::2
call :callfunction :Pluginable3, settings 2 n
::4
::5
echo =================================================================
pause
exit /b 0
I don't understand how this works... Sorry, and the parameter (just checking) arguments are normal because some functions can have them right, like (e.g.):Code: Select all
:header
echo %~1
pause
It just processed top down.
The lines ":", "::" just don't do anything.
So it echoes "===..." lines and call the pluginable functions with some parameters.What do you want to know? (The @'s are just to avoid the default command echo.)Adrianvdh wrote:You need to explain this to me, the code I know the consept:
(... code)This tells the plugin manager to be called the replaceable function ":Pluginable2"Adrianvdh wrote:What do these mean in "SamplePlugin.bat":Code: Select all
@rem MY_BATCH_FILE_NAME_TEXT ------> :Pluginable2
This is an example of a batch file in plugins folder that is not a plugin of SampleMain.bat.Adrianvdh wrote:and of course this:Code: Select all
@echo MY_BATCH_FILE_NAME_TEXT MY_BATCH_FILE_NAME_TEXT2 MY_BATCH_FILE_NAME_TEXT3
penpen
No, what does the "call", "list", "help" etc do. Are thy just dummy functions?
Sorry I seem to be very difficult, well I am not. I just seem to be missing something.
penpen wrote:The "callfunction" is used to call function(s) within plugins to be replaced by the default function(s)
Well, the "callfunction" is the function that is used to call functions within the plugins, those functions replace the functions within "batch-dll"
penpen wrote:This tells the plugin manager to be called the replaceable function ":Pluginable2"
Are you saying that the plugin manager will be replace by the plugin's function?
Please for give me for being so retarded and having such a difficult time with you, unlike you I don't have all that experience you have (lucky). Ahh I wish I knew all that.