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 a file named scr.hmp (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 use
icon=
; the icon tag must be set although it'll not be used
uninstall=Sampler v1.0|Sampfile.exe|scr.hmp
; uninstall string - the main executable is Sampfile.exe and the script file is scr.hmp
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 a valid user 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 see the write command.
Shell = Sampfile.exe
;This is the name of the pluginÆs executable (placed in \plugins folder too)
END
Back.