I've somehow managed to get the pointer/offset, size, and filename of the archive. But have no idea as to how to write the script since it's an external directory kind of archive and there is no sample of this type of archive in here
The first two instructions automatically open the two files based on their extension, no matter what file the user selects. The first mkh file will be the current one (file number 0), while the latter is number 1. The 1 at the end of the "log" instruction indeed tells to use the mkp file loaded as number 1.