Jump to content

Building chm


kristoff
 Share

Recommended Posts

Hi Gang,

Is there a UDF to convert html files to CHM help file format please ?

I have huge amount of HTML files ( with embedded files/link/picture ) and would like to cmpiled all in one.

I have the VBS but would like to make it with more secure code. ;)

TIA

Cheers

Link to comment
Share on other sites

Hi Gang,

Is there a UDF to convert html files to CHM help file format please ?

I have huge amount of HTML files ( with embedded files/link/picture ) and would like to cmpiled all in one.

I have the VBS but would like to make it with more secure code. ;)

TIA

Cheers

If you have the HTML Help workshop then just create your hhc and hhp files call the compiler using AutoIt.

I have an app that I wrote that will do it but you still need the workshop installed and you have to create the hhc file if it doesn't exist. BTW it also creates Web Help files from your existing project

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I have the VBS but would like to make it with more secure code. ;)

what's the VBS code?

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I have the VBS but would like to make it with more secure code. :evil:

;) what is VBS? Somthing you can get? :lmao:

Seriously, why do you want to do it?

And why isn't the VBS code good secure enough?

Give me some good arguments and I'l consider to to give you a encoded version of my own little buggy html help workshop project builder.

Link to comment
Share on other sites

Hi,

I was happy to see that this topic came up.

My I ask you to help me to get this HTML workshop?

I have just translated a program's HELP file, which was originally in CHM and now I have to compile the HTMLs back to single CHM file.

Or, can you help me how to create the HHC and HHP files?

Or, maybe some link to a program which can do the trick? Unfortunatelly I have 2 X 121 html files (2 languages) to create the CHM from.

Thanks for help!

Link to comment
Share on other sites

@Uten

Thanks

Code in VBS is not secure cause anyone can use it/read it...Even if if you the encrypted version ( which is not really an encryption, rather an obfuscation method )

Do not know any other method to create chm file than µsoft HTML workshop...except shareware :">

@/dev/null ( I like this nickname :evil: )

Not sure I got the question :"> VBS....for VB Script....is that...may be you're teasing ;)

Anyway..

@Volly

Thanks....but prefer something I wrote...rather shareware...cannot use this kind of software...Prohibited :lmao:

So no chance ?

Link to comment
Share on other sites

@/dev/null ( I like this nickname :evil: )

Not sure I got the question :"> VBS....for VB Script....is that...may be you're teasing ;)

Anyway..

well, you started the whole VBS thing, now post that "damn" VBS code you have....n :lmao:

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi Gang,

Is there a UDF to convert html files to CHM help file format please ?

I have huge amount of HTML files ( with embedded files/link/picture ) and would like to cmpiled all in one.

I have the VBS but would like to make it with more secure code. :lmao:

TIA

Cheers

@Uten

Thanks

Code in VBS is not secure cause anyone can use it/read it...Even if if you the encrypted version ( which is not really an encryption, rather an obfuscation method )

Do not know any other method to create chm file than µsoft HTML workshop...except shareware :">

Hilarious, Are you compiling a chm file or are you going to sell software making chm's?

Your first post claimed that you wanted a way to compile the damn thing. ;)

Nahh, this is a waste of time, i'm out. Sorry...

Link to comment
Share on other sites

Hi,

I was happy to see that this topic came up.

My I ask you to help me to get this HTML workshop?

I have just translated a program's HELP file, which was originally in CHM and now I have to compile the HTMLs back to single CHM file.

Or, can you help me how to create the HHC and HHP files?

Or, maybe some link to a program which can do the trick? Unfortunatelly I have 2 X 121 html files (2 languages) to create the CHM from.

Thanks for help!

Only 2 points to make.

If you're using 2 languages you are better off with 2 CHMs

If you decompiled the original CHM file then take a look in the folder you decompiled to. There should be a hhc file if one was existing in the original file.

My Help app will create a hhp file for you but if you don't have a hhc then you will have to create tha yourself using HTML Help Workshop or similar. If you know the format to use they can also be created using any text editor. Just open any hhc file and the format is easy to figure out.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

GEOsoft:

Yeah, of course, 1 chm per language.

I have the original CHM and the decompiled folder structure.

NOTHING has been altered, only the content of the html files. File names, pictures everything else remained the same.

I have .ali, .h, .hhp, contents.htm, .hhk, .hhc. These are not altered (well, the contents.htm is translated...).

Then I have HTML, IMG, LocIMG folders also. From these only the contents of the HTML folder with 121 html files were altered.

So, I thought it will be just click and drop to re-create the original file. Now, I am completelly confused.

Can your sw help?

Or how should I supposed to remake the CHM from this point?

Thanks for any help...

Link to comment
Share on other sites

Can your sw help?

Or how should I supposed to remake the CHM from this point?

Thanks for any help...

You have only updated files and kept the structure? So all you need to do is double click on the HHP file to start Html Workshop with the project loaded. Click on the 3rd button in the toolbar to compile the CHM file.
Link to comment
Share on other sites

You have only updated files and kept the structure? So all you need to do is double click on the HHP file to start Html Workshop with the project loaded. Click on the 3rd button in the toolbar to compile the CHM file.

OR

If you want to do it using a command string then it's

RunWait(<path to HTML HelpWorkshop folder>&"\hhc.exe " & <path\filename.hhp)oÝ÷ ØLZ^jëh×6
$Compiler = RegRead('HKCU\Software\Microsoft\HTML Help Workshop', "InstallDir") & "\hhc.exe "
$File = "C:\Help Project\My Help.hhp"
RunWait($Compiler & $File)oÝ÷ Ù*%ºØ¨`«y«^jw°z{kÉú+_W¬©t*&¦)^"së¢
ÚÚ±àk£¶ÇEÄjwlzØ­jËay×jém¦º ­©éî±æ®¶­se6VÆÄWV7WFUvBb33c´fÆRÂb33²b33²Âb33²b33²Âb33´6ö×ÆRb33²Ä5uôFR

;)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Hi

Sorry, was out for a while, and very busy at the moment.

Here's the vbs.

'---------------------------------------------------------------

' Script name: HtmToChm.vbs

' This script creates a .CHM file on the desktop from a folder having lots of html files.

' The generated CHM file is named output.chm under your html folder.

'---------------------------------------------------------------

 

option explicit

 

Dim WshShell,fso

Dim HHC, RepBase, FicHHP, t, c

Set WshShell=WScript.CreateObject("WScript.Shell")

Set fso=CreateObject("Scripting.FileSystemObject")

On Error Resume Next

Err.Number=0

 

 

' Check if HTML Help Workshop is installed on the system.

' Retrieve executable location.

'-------------------------------------------------------

HHC=WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\HTML Help Workshop\InstallDir")

If Err.Number<>0 Then

 Wscript.Echo "In order to use this script, you need HTML Help Workshop" & _

 vbCrLf & "http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconhh1start.asp"

 wscript.Quit

End If

On Error Goto 0

HHC=fso.BuildPath(HHC,"hhc.exe")

 

If Not fso.FileExists(HHC) Then

 Wscript.Echo "Warning, the HTML Help Workshop is registered but the compiler was not found"

 WScript.Quit

End If

 

 

 

' Get HTML folder

'----------------

If 1=MsgBox("This script creates a .CHM file on the desktop from a folder having lots of html files.",1) Then

 RepBase=B("Choose the folder hosting your website")

 If IsNull(RepBase) Then

     MsgBox "Please choose a Folder"

 Else

  ' Parse all files within the folder/sub-folders

  '----------------------------------------------

  T=Recurs(RepBase)

 

  ' Create Help configuration file

  '-------------------------------

  FicHHP=fso.BuildPath(RepBase,"htmto.HHP")

  Set c=fso.CreateTextFile(FicHHP,True)

  c.WriteLine "[OPTIONS]"

  c.WriteLine "Compatibility=1.1 or later"

  c.WriteLine "Compiled file=" & fso.BuildPath(RepBase,"OUTPUT.chm")

  c.WriteLine "Default topic=" & Mid(Debut(T),Len(RepBase)+2)

  c.WriteLine "Display compile progress=NO"

  c.WriteLine "Language=0x409 English (United States)"

  c.WriteLine "Title=This file is the Property of Hewlett Packard - Confidential"

  c.WriteLine vbCrLf & "[FILES]"

  c.WriteLine T

  c.WriteLine vbCrLf & "[INFOTYPES]" & vbCrLf

  c.Close

  Set c=Nothing

 

  ' Launch command to create help file

  '-----------------------------------

  wshShell.Run Chr(34) & HHC & Chr(34) & Chr(32) & Chr(34) & FicHHP & Chr(34),3 ,-1

  fso.DeleteFile FicHHP

 End If

End If

Set fso=Nothing

Set WshShell=Nothing

 

'---------------------

' Functions definition

'---------------------

 

'-------------------------------------------

' Display windows to retrieve root directory

'-------------------------------------------

Function B(Msg)

 Dim a,f,i

 Set a=WScript.CreateObject("Shell.Application")

 On Error Resume Next

 Set f=a.BrowseForFolder(&H0&, Msg, &h1&)

 B=f.ParentFolder.ParseName(f.Title).Path

 If Err.Number<>0 Then

  B=Null

  If f.Title="Desktop" Then B=WshShell.SpecialFolders("Desktop")

  i=InStr(f.Title,":")

  If i>0 Then B=Mid(f.Title,i-1,2) & "\"

 End If

 Set a=Nothing

End Function

 

 

'--------------------------------------------------

' Parse recursively all the htm/html under a folder

'--------------------------------------------------

Function Recurs(ByVal p)

 Dim f,k,s,t

 Set f = fso.GetFolder(p)

 For Each k in f.Files

  t = ucase(k.name)

  If (Right(t,3) = "HTM") or (Right(t,4)="HTML") Then

   s = s & fso.BuildPath(k.parentfolder, k.name) & vbCrLf

  End If

  if (Right(t,3) = "MOV") or (Right(t,2)="AU") Then

   s = s & fso.BuildPath(k.parentfolder, k.name) & vbCrLf

  End If

 Next

 For Each k in f.subFolders

  s = s & Recurs(k)

 Next

 Recurs = s

End Function

 

 

'-----------------------

' Retrieve root web page

'-----------------------

Function Debut(byval k)

 Dim s

 s=Trim(InputBox("Rentrez le nom du fichier (sans chemin) du fichier HTML principal - input the root filename"))

 if (InStr(ucase(k),ucase(s))=0) Or (Len(s)=0) Then

  MsgBox "Le nom du fichier HTML précisé est invalide - file not found"

 Else

  If s<>"" Then

   k = vbCrLf & k

   k = Left(k,InStr(ucase(k),ucase(s))+Len(s))

   s = Len(k)

   While Mid(k,s,1)<>Chr(10)

    s = s -1

   Wend

   s = Mid(k,s+1)

  End If

 end If

 Debut = s

End Function

cheers

Edited by kristoff
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...