Sample Plugin

We are going to develop a sample plugin named ôSamplerö and place it under the Execute menu. First we need to write the script file (and test it) then write the main executable. We wonÆt discuss the main executable because this has nothing to do with Hackman. You can use any development language (and written language even if we strongly recommend English) and do whatever you want.

Open the scr.hmp file (or name it as you wish) with notepad and save it in the \plugins folder inside HackmanÆs directory. Consider this following code:

Sampler
menu = run
; first line shows the name of the plugin
; second line show the menu where the ôSamplerö menu should be placed.
extra=no
;this line tells hackman that no help file is used by the plugin
about=no
;the plugin has no about box
config=
;the plugin has no configuration panel
shortcut=
;this line is reserved for future usage
icon=
;the icon tag must be set although it'll not be used

Then we must define HackmanÆs behavior. Should he expect an input file from our plugin? Then he must wait for the plugin to finish:

BEGIN
;begins the main script
mode=2
;output file (input for our plugin) will be given in mode 2.
Selection = yes
;our plugin requires userÆs selection to operate
wait = yes
;Hackman should wait for the plugin to finish
write = yes
;Our plugin will give Hackman a patch file to be applied to the logged file. For further information, please consult the script book.
Shell = Sampfile.exe
;This is the name of the pluginÆs executable (placed in \plugins folder too)
END
Back