Topic: Launching a HLP (1 of 19), Read 59 times
Conf: VEDIT Macro Library
From: Michael Baas
Date: Saturday, August 16, 2003 03:01 AM

I would like to launch an HLP file with a user-macro. Tried various
permutations of
System('%SystemRoot%\System32\winhlp32.exe "D:\Programme\Inno Setup
4"\ISetup.hlp',NOWAIT)
with different args, changed the '" etc., but this all resulted in "Can
not shell out, error #2 or #65".

What am I doing wrong here?

Thanks for any help

Michael
(using W2k, SP4)

 


Topic: Re: Launching a HLP (2 of 19), Read 50 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Saturday, August 16, 2003 04:18 AM



vedit-macros Listmanager am 16 Aug 2003, 3:05:

> changed the '" etc., but this all resulted in "Can not shell out,
> error #2 or #65".

Just a guess:

Some time ago i realized thet Vedit refused to recognize `.. `and ´
... ´ as delimiters, at least from a german keyboard. The apostroph
(' .. ') is accepted.

Fritz

 


Topic: Re: Launching a HLP (3 of 19), Read 47 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Saturday, August 16, 2003 04:34 AM



vedit-macros Listmanager am 16 Aug 2003, 3:05:

>System('%SystemRoot%\System32\winhlp32.exe "D:\Programme\Inno Setup
>4"\ISetup.hlp',NOWAIT)

Another questions is how pathnames containing spaces are handled by
Vedit. I couldn't find anything about that in the manuals.

Fritz

 


Topic: AW: Launching a HLP (4 of 19), Read 46 times
Conf: VEDIT Macro Library
From: Michael Baas
Date: Saturday, August 16, 2003 09:52 AM

Thanks Fritz for your replies.
re. the first one: I've only used standard apostroph or german ".

> Another questions is how pathnames containing spaces are handled by
> Vedit. I couldn't find anything about that in the manuals.

But in that case the space are not relevant to Vedit. They are part of
the argument...

Cheers

Michael

 


Topic: Re: Launching a HLP (7 of 19), Read 45 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Monday, August 18, 2003 03:02 PM

At 12:37 AM 8/16/2003, you wrote:
>>System('%SystemRoot%\System32\winhlp32.exe "D:\Programme\Inno Setup
>>4"\ISetup.hlp',NOWAIT)
>
>Another questions is how pathnames containing spaces are handled by
>Vedit. I couldn't find anything about that in the manuals.

All pathnames containing spaces are handled by Windows(!!) (not just VEDIT) by enclosing them in double-quotes.

Since the pathname is often in double-quotes, the System() command therefore uses single-quotes for its delimiter.

Therefore, the command above has INCORRECT delimiters. The correct delimiters
would be:

System('%SystemRoot%\System32\winhlp32.exe "D:\Programme\Inno Setup 4\ISetup.hlp"',NOWAIT)

Please note that the "DOS" option is also needed as explained by Christian:

System('%SystemRoot%\System32\winhlp32.exe "c:\vedit\veditpw.hlp"',
DOS+SIMPLE+NOWAIT)

Ted.

 


Topic: Re: Launching a HLP (8 of 19), Read 47 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Monday, August 18, 2003 05:19 PM

vedit-macros Listmanager am 18 Aug 2003, 15:05:

> All pathnames containing spaces are handled by Windows(!!) (not just
> VEDIT) by enclosing them in double-quotes.
>
> Since the pathname is often in double-quotes, the System() command
> therefore uses single-quotes for its delimiter.

Thanks for explaining this, Ted. Since all DOS-related matters are
notoriously underdocumented in the Win docu, some clarification in
the macro language manual would be welcome.

BTW, if y try:

(1) sys("c:\program files\ws_ftp\ws_ftp95.exe",dos+nowait)

I get message "program not found", as expected in view of your
comments. But, amazingly,

(2) sys("c:\program files\ws_ftp\ws_ftp95.exe")

(no delimiters, no DOS option) WS_FTP is launched.

Fritz

 


Topic: Re: Launching a HLP (9 of 19), Read 47 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Wednesday, August 20, 2003 04:15 PM

At 05:22 PM 8/18/2003, you wrote:
>(1) sys("c:\program files\ws_ftp\ws_ftp95.exe",dos+nowait)
>
>I get message "program not found", as expected in view of your
>comments. But, amazingly,
>
>(2) sys("c:\program files\ws_ftp\ws_ftp95.exe")
>
>(no delimiters, no DOS option) WS_FTP is launched.

Yes, your (2) works without the single-quotes, but it is best to follow the documented syntax.

About 2 years ago Christian Ziemski and I exchanged over 100 emails as I modified the Sys() command and added new options to better support Win2000 (and now XP).

Ted.

 


Topic: Re: Launching a HLP (5 of 19), Read 52 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Saturday, August 16, 2003 04:52 PM

Michael:

you wrote:

>I would like to launch an HLP file with a user-macro. Tried various
>permutations of
>System('%SystemRoot%\System32\winhlp32.exe "D:\Programme\Inno Setup
>4"\ISetup.hlp',NOWAIT)
>with different args, changed the '" etc., but this all resulted in "Can
>not shell out, error #2 or #65".

Try it with one of these:

1) System('%SystemRoot%\System32\winhlp32.exe "c:\vedit\veditpw.hlp"',
DOS+SIMPLE+NOWAIT)

2) System('start "c:\vedit\veditpw.hlp"', DOS+SIMPLE+NOWAIT)

3) System('"c:\vedit\veditpw.hlp"', DOS+SIMPLE+NOWAIT)


The "DOS+SIMPLE" option starts a DOS box in background which in turn
starts the help. On my W2K all three versions are working fine.

The exact behaviour is dependent on the used OS version
For example in the original VEDITPDF.VDM you can find a typical:

if (Is_WinNT) { //If WinNT/2000...
System(`"|(HOME)\|@(103)"`,DOS+SIMPLE+NOWAIT)
} else {
System(`start "|(HOME)\|@(103)"`,DOS+SIMPLE+NOWAIT)
}
Return


Christian


PS: Sollen wir drei die DVUG (Deutsche VEDIT User Group) gründen?
(Halt, stop, das war nur ein Scherz! ;-) )

 


Topic: AW: Launching a HLP (6 of 19), Read 51 times
Conf: VEDIT Macro Library
From: Michael Baas
Date: Monday, August 18, 2003 02:29 AM

Thanks Christian,

that did the trick ;-)

> PS: Sollen wir drei die DVUG (Deutsche VEDIT User Group) gründen?
(Halt, stop, das war nur ein Scherz! ;-) )

Hmm, mir würde eher ein Kürzel gefallen wie "VEDIT Enthusiasten
Deutschland i* t*" (vielleicht "im Team"?)
Und dann könnten wir noch Untergruppen gründen, etwa
VDM (meine Gruppe): VEDIT Deutschland Main-Kinzig
VCS VEDIT Christian's Stadt ;-)
...

:-)

Michael

 


Topic: Re: Launching a HLP (10 of 19), Read 32 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Saturday, March 13, 2004 06:44 PM

On 8/16/2003 4:52:06 PM, Christian Ziemski wrote:
>
>Try it with one of these:
>
>
>2) System('start
>"c:\vedit\veditpw.hlp"',
>DOS+SIMPLE+NOWAIT)
>
>
>
>The "DOS+SIMPLE" option starts
>a DOS box in background which
>in turn
>starts the help. On my W2K all
>three versions are working
>fine.
>
Thanks Christian,

On my Win98 your item 2 just works fine for me.
Now I would like to have an enhancement. Specifically, I would like to open the vedit help file at the topic "Reg_Empty". In other words, I would like to have the same result, via the System macro, as typing in the Vedit Command Mode

help("Reg_Empty") .


Thanks for all your help.
P.S. Sometimes I do not have access to a good monitor. Since webboard does not allow me to resize the window, in this case I do not see what I type.

-peter.

 


Topic: Re: Launching a HLP (11 of 19), Read 31 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Sunday, March 14, 2004 10:47 AM

At 06:44 PM 3/13/2004, you wrote:
>On my Win98 your item 2 just works fine for me.
>Now I would like to have an enhancement. Specifically, I would like to open the vedit help file at the topic "Reg_Empty". In other words, I would like to have the same result, via the System macro, as typing in the Vedit Command Mode
>
>help("Reg_Empty") .

I am not aware of any way to launch a .HLP file at a particular topic. Even if it is possible (which I doubt), the topics are only identified by obscure numbers.

However, you could shell to VEDIT with the desired command:

vpw -cHelp("Reg_Empty")

In general, you should use delimiters with the "-c" invocation option:

vpw -c`Help("Reg_Empty")`

Ted.

 


Topic: AW: Launching a HLP (14 of 19), Read 19 times
Conf: VEDIT Macro Library
From: Michael Baas
Date: Monday, March 15, 2004 03:27 AM

Ted wrote:

> I am not aware of any way to launch a .HLP file at a particular topic.
Even if it is possible
> (which I doubt), the topics are only identified by obscure numbers.

You CAN launch a HLP at a topic by using the 'obscure number' OR you can
launch the HLP using a keyword. Using user32.C32|WinHelpA from the W32-API.

BTW, the numbers are not so 'obscure'. It depends on how you create your
HLP, but if you use Microsoft's Help Workshop, the mapping of these numbers
to the various topics can be found in the HPJ-file.

Cheers

Michael

 


Topic: AW: Launching a HLP (15 of 19), Read 19 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Monday, March 15, 2004 05:08 AM

On 3/15/2004 3:27:24 AM, Michael wrote:
>
>BTW, the numbers are not so 'obscure'. It depends on how
>you create your HLP, but if you use Microsoft's Help
>Workshop, the mapping of these numbers to the various >topics can be found in the HPJ-file.

I assume Ted is using this mapping internally for the Help() command.

Christian

 


Topic: AW: Launching a HLP (16 of 19), Read 23 times
Conf: VEDIT Macro Library
From: Michael Baas
Date: Monday, March 15, 2004 05:19 AM

> I assume Ted is using this mapping internally for the Help() command.

Sorry, maybe my reply was not totally on the point then. I did not follow
the entire discussion in detail, but Ted's remark "I am not aware of any way
to launch a .HLP file at a particular topic." just got my attention...

Michael

 


Topic: Re: AW: Launching a HLP (17 of 19), Read 18 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Monday, March 15, 2004 11:32 AM

At 05:09 AM 3/15/2004, you wrote:
>>BTW, the numbers are not so 'obscure'. It depends on how
>>you create your HLP, but if you use Microsoft's Help
>>Workshop, the mapping of these numbers to the various >topics can be found in the HPJ-file.
>
>I assume Ted is using this mapping internally for the Help() command.

Yes, I am. But there are only about 100 topic numbers, one for each
menu, dialog box, etc. Windows help also has a search function which is
how I implement e.g. help("buf_Switch").

I really don't see why any of this would be of use to anyone, since it
is possible to shell to VEDIT with the desired help command.

Ted.

 


Topic: Re: Launching a HLP (12 of 19), Read 35 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Sunday, March 14, 2004 10:51 AM

On Sat, 13 Mar 2004 18:44:00 -0500, Peter Rejto wrote:

>Now I would like to have an enhancement. Specifically, I would like to open the
>vedit help file at the topic "Reg_Empty". In other words, I would like to have
>the same result, via the System macro, as typing in the Vedit Command Mode
>
>help("Reg_Empty")

If you want to open a topic in VEDIT's help file, why are you not
using the Help() command???


The System('start "veditpw.hlp"'... calls the Windows' help viewer.
And it *may* be possible to call the help file viewer with a topic to
begin with, but I don't know the help system good enough.
Try Google, perhaps with the search items
"winhlp32 command line parameters")


Christian

 


Topic: Re: Launching a HLP (13 of 19), Read 34 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, March 14, 2004 07:58 PM

On 3/14/2004 10:51:39 AM, Christian Ziemski wrote:
>On Sat, 13 Mar 2004 18:44:00 -
>

>Try Google, perhaps with the search
>items
>"winhlp32 command line parameters")


Thanks Christian,

Your Google question is certainly much more specific than mine! WHAT A GREAT IDEA.

I just tried it. I got some answers, but they look too complicated. I consider them as a proof of Ted's conjecture, saying that he doubts that this is possible.

Putting it differently, the ability to open and search the Vedit help file is a Vedit specific feature. In fact, quite a remarkable one.

Well here goes my model problem. My original problem was this. I have a .tex file open in Vedit and I need help with a Tex command. I learned from this thread that I can do that by calling my LATEX2E.HLP file from within Vedit. (Just as Michael does it for his program. Too bad that I can not mimic the Vedit search feature.)

Thanks again,

-peter.

 


Topic: Re: Launching a HLP (18 of 19), Read 15 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, April 04, 2004 06:22 PM


>On 3/14/2004 10:51:39 AM, Christian
>Ziemski wrote:
>>On Sat, 13 Mar 2004 18:44:00 -
>>
>
>>Try Google, perhaps with the search
>>items
>>"winhlp32 command line parameters")
>
>
>Thanks Christian,
>
> My
>original problem was this. I have a .tex
>file open in Vedit and I need help with
>a Tex command. I learned from this
>thread that I can do that by calling my
>LATEX2E.HLP file from within Vedit.

In the meantime, I did find a work around. Then, I wrote a little macro that I called CONT-LATEX2E.VDM, which gives this work around. I plan to upload it.

It is a simple adaptation of your CONT-HLP.VDM macro. I use it to find the latex_command/word at the cursor and then I copy the selected latex_command/word to the Windows clipboard. Then I launch the LATEX2E.HLP help file as per your earlier instructions in this thread. Finally, I use the Ctrl-V keystroke to copy the Windows clipboard into the input box of the Latex2e Help Dialog_Input_Box.

I take it is no accident that the Vedit Ctrl-C and Ctrl-V keystrokes work in other programs as well. I bet this is why Ted used them in Vedit. At the same time, this was new to me and I could not find a written reference for it.

I also realize that I have asked the wrong model question. This macro has nothing to do with the LATEX2E.HLP help file help topics.

Thanks again for all your hints.

-peter.

P.S. When Fritz gets done with his ambitious Vedit project I would appreciate hearing from him how does he treat the Latex2e help issue.

 
Contex sensitve help for latex2e.

 


Topic: Re: Launching a HLP (19 of 19), Read 15 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Sunday, April 04, 2004 08:40 PM


>I take it is no accident that the Vedit
>Ctrl-C and Ctrl-V keystrokes work in
>other programs as well. I bet this is
>why Ted used them in Vedit. At the same
>time, this was new to me and I could not
>find a written reference for it.
>
Peter, these have been part of Windows since 3.0.