Tools, External tool won't open CHM file lazarus / 13-General ---------------------------------------------------------------------- bulrush · 2016-06-02 10:54 Lazarus 1.6.0 with Freepascal 3.0.0 on Windows 7. I tried making an external tool by going to Tools, Configure External Tools. I pointed a tool to a CHM file in $(lazarus)/docs/chm/lcl.chm. But when I click Tools, and the external tool I made, the CHM file doesn't open nor do I get an error. I know CHM files are associated with Winhelp because I can open CHM files fine from the File Manager in Windows. I would assume Lazarus uses the OS to automatically determine how to open the CHM file but I might be wrong. If it cannot find the file based on the path to the help files, Lazarus should display an error. Did I configure something wrong? Here is my config screen for the external tool. http://i.imgur.com/ldUI1Ei.png My main issue is I want to learn how to use the different standard components as I'm new (again) to pascal. It's been 20 years since I used Delphi 6pe that I'm a beginner again. ---------------------------------------------------------------------- marcov · 2016-06-02 11:08 external tool runs an external tool, a data file is not an external tool. It is easily fixed though: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program runchm; var chmfile: string; begin  if paramcount>0 then   begin    chmfile:=paramstr(1);     ShellExecute(0,'open',pchar(chmfile), nil,nil,SW_SHOWMAXIMIZED);   end;end. and just add c:\path\to\runchm.exe as program name, and the path to the chm in the parameter field. ---------------------------------------------------------------------- bulrush · 2016-06-02 11:35 Thank you. I found c:\windows\system32\help.exe and I will try to pass a chm file to that using your ShellExecute(). EDIT: Hm. I put this as my External Tool program name and it didn't work. No error message no anything. It's like that external tool menu item doesn't do anything at all. Code: [Select]c:\chuck\compiler\lazarus\components\chmhelp\lhelp\lhelp.exe C:\chuck\compiler\lazarus\docs\chm\fcl.chm When I run lhelp.exe by double-clicking on it, then do File, Open, it opens a CHM just fine. It appears lhelp.exe does not accept parameters. ---------------------------------------------------------------------- bulrush · 2016-06-02 15:35 Marcov, it looks like you are missing one or more 'uses' units. Marcov, I compiled and ran your program and my CHM file still won't open. A Googly search tells me this is a problem with Windows 7 AND CHM files on a network drive, but still I think Webroot is part of the problem as I cannot give lazarus.exe or any chm files an exception to allow them to open. ---------------------------------------------------------------------- marcov · 2016-06-02 16:05 Quote from: bulrush on June 02, 2016, 05:35:03 pmMarcov, it looks like you are missing one or more 'uses' units. possible. I was at work behind a system without delphi/lazarus, and I wrote from memory. My guess would be "shellapi" ---------------------------------------------------------------------- bulrush · 2016-06-02 16:32 I'm an idiot. The External Tools dialog has text boxes for the command, and a separate text box for parameters. I put the parameters in the same box as the command, like a Windows shortcut, so it didn't work. When I took out the parameter from the command box, and put the parameter in the parameter box, it worked.