|
Post by Stefan on Apr 8, 2021 17:21:02 GMT -5
I can't explain why it was failing, it made no logical sense that it could open A.CHM, B.CHM but not C.CHM. And then for me it worked ok on C.CHM and failed on B.CHM. Totally illogical. George,
Could this be related - yet again - to the fact that the downloaded files have this BLOCKED property nowadays (we discussed in another earlier thread) until it is unblocked manually? In my case the HELP command opens the CHM file but opens but the pages are empty/INOP unless I unblock the CHM file.
Another stab in the dark - permissions. Win10 is picky what it lets users do inside the "Program Files" folders.
Dave, do you get any problems if you navigate to C:\Program Files (x86)\SPFLITE2\ with Windows Explorer and double-click the SPFLite Edit Macros.CHM file?
|
|
|
Post by davecheckley on Apr 9, 2021 2:30:14 GMT -5
Hi Stefan, I think I've already answered that one. I can double-click on the file and open the Help; I can also click on the SPFLite Macro Help shortcut in the SPFLite foled in the Start menu. It's only the HELP MACROS command which fails. I have a sneaking suspicion it's one of my antiviral programs disallowing embedded spaces in a program call (but I've no evidence for that at all, of course).
George says that GetShortPathName should be returning a name without spaces, but it might be failing on the actual file name (as opposed to the path) for me.
Regards, Dave
|
|
|
Post by Stefan on Apr 9, 2021 4:11:53 GMT -5
Hi Dave, Yes, I thought you'd already told us, but I looked through the previous posts and couldn't find it again. My wife is right - some men (me) can't find things unless they already know where they are!
George,
I think(!) it may be that you are tripping over the START command syntax. Because the edit macro help file has spaces embedded in the name, it needs to be in double quotes.
I've run some variations of the command you build, entered directly into the Windows CMD shell. I've tried several different combinations of quotes around the various components of the command within the START command's syntax. Most give error messages including the message Dave reported.
There are only two command forms that work and actually open the help file.
C:\WINDOWS\system32\cmd.exe /c START "wintitle" "C:\Progra~2\SPFLite2\SPFLite EDIT MACROS.CHM"
C:\WINDOWS\system32\cmd.exe /c START "wintitle" "C:\Program Files (x86)\SPFLite2\SPFLite EDIT MACROS.CHM"
You must specify the quoted wintitle part to allow you to place the filename in quotes which are needed due to the spaces in the filename. Otherwise START will eat the quoted filename as the window title and just open another command window. I note that the "SPFLite.CHM" file needs no quotes around the filename and thus the "wintitle" bit is also optional.
I know.... that still leaves questions.... "Why does it work on my system?" "Why did this used to work"? "Did the Macro Help filename not have spaces in it before?
I don't know so my answer is, ... cosmic rays?
===> Stefan, It's an international conspiracy, with George (Canada), me (US) and several users in Europe all conspiring against SPFLite to make it fail just to be an embarrassment. I read it straight from some conspiracy theory site the dark web
|
|
|
Post by George on Apr 9, 2021 10:15:39 GMT -5
Stefan: You can also remove the specification of CMD.EXE, after all, you are already in a CMD window. Just start with the START command.
Regardless, I'm staying with invoking HH.EXE since I NEED to be able to specify a command line operand (-mapid nnn) to specify where to open the CHM file. And when using ASSOC to trigger HH.EXE from the CHM file-type, I could not find a working syntax for START to allow operands.
If you want to try, using the main SPFLite.CHM file, try to get a command line operand of -mapid 103 added. If it works, Help will open to the Primary FIND command.
George
|
|
|
Post by George on Apr 9, 2021 12:06:02 GMT -5
So to correct it you need to alter CHM with an FTYPE command. Not sure I want to alter some setting on a user's system (assuming of course the Installer I use will do that).
There are just so many secrets buried in Windows, even MS people don't know them - like the CaretTimeout to fix the blink problem.
George
|
|
|
Post by Stefan on Apr 9, 2021 12:43:23 GMT -5
George I'm in totally unfamiliar territory with HH.EXE, BUT...
From a normal Windows CMD Prompt window....
... the following command syntax opens the SPFLite.CHM directly on the FIND page
HH.EXE -mapid 103 ms-its:C:\progra~2\spflite2\spflite.chmAnd this command does the same for the macro file - id 103 apparently maps to GET_Lnum
HH.EXE -mapid 103 ms-its:C:\progra~2\spflite2\SPFLite Edit Macros.chmAnd you can stick START in front of either of these and the appropriate page in the relevant HELP file will open, e.g. START HH.EXE -mapid 103 ms-its:C:\progra~2\spflite2\spflite.chm
..or..
START HH.EXE -mapid 103 ms-its:C:\progra~2\spflite2\SPFLite Edit Macros.chm
Is that what you're looking for?
PS: Look mum, no quotes!
|
|
|
Post by George on Apr 9, 2021 13:04:06 GMT -5
Stefan: That's exactly what I ended up with. Robert however wanted to have the CHM file opened in HIS default program (Sumatra PDF), which means opening the file using the ASSOC entry for CHM.
but a) it takes a change to a users ASSOC entry to get the extra parameters accepted and b) as it turns out Sumatra PDF doesn't handle the HH.EXE style operands.
So it looks like what you found (and what I had already found) is the really only way.
George
|
|
|
Post by davecheckley on Apr 11, 2021 8:23:49 GMT -5
Hi George, I've finally managed to execute your beta version, after fighting AVG all the way, and I'm delighted to report that I can open the Macro help file with the HELP MACROS command :-)
Thanks very much, Dave
|
|
|
Post by George on Apr 11, 2021 9:47:38 GMT -5
Robert: The latest HELP implementation will now open the CHM file independently, and they will not close when SPFLite closes. So you can have multiple CHMs open at the same time.
George
===> I think that's a nice feature. I will check it out ASAP - R
|
|