Silverfrost Forums

Welcome to our forums

Hypertext - %ht

15 May 2007 10:41 #1930

I am using %ht to display help text relating to a particular screen - the .HTM file contains text relating to various screens and I wish, on entry, to jump to the part relating to that screen.

The call I use from 'screen 6' is:

   integer*4 function help_func()

c INCLUDE <WINDOWS.INS> c integer*4 ii ii = winio@('%pv%60.20ht[SIX]') help_func = 1L end

If SIX does not exist in the .HTM I get an error on running. When SIX does exist then all works fine BUT the file display still opens up at the start - not at SIX.

Section of .HTM file given below.

Any assistance would be appreciated.

Thanks, Bill

<DOC name='ONE'>

On Screen One you enter details of the problem to be solved...

Lots of text....

<DOC name='SIX'> <h1>Packing Options</h1>

On Screen 6 you enter details of Packing Options (lots of text)

15 May 2007 11:39 #1931

On the face of it I cannot see anything wrong with your outline.

If you want to construct a very short working sample then I will attempt to step through it to find out what is going wrong. You can post your sample here including both your source file and your html file.

15 May 2007 4:34 #1932

Thanks Paul - Code below -

Program -

  winapp 50000,50000,'paul.rc'
  OPTIONS(INTL)
  OPTIONS(LOGL)
  implicit none
  INCLUDE <WINDOWS.INS>
  external back_func,help_func
  integer*4 ii,icntrl
  call add_hypertext_resource@('help')

  ii=winio@('%ww[maximise,no_minbox,fixed_size]&amp;')
  ii=winio@('%mn[&amp;Help]&amp;',help_func)
  ii=winio@('%nl%cn%14^bt[&amp;Exit]&amp;',back_func)
  ii=winio@('%lw',icntrl)
  call yield_program_control@(y_temporarily)
  end

  integer*4 function back_func()
  include <windows.ins>
  back_func = 0L
  end

c integer4 function help_func() INCLUDE <WINDOWS.INS> integer4 ii ii = winio@('%`bg[white]%pv%60.20ht[SIX]') help_func = 1L end

Resource (paul.rc):

help HYPERTEXT 'cargohlp.htm'

HTM file (cargohlp.htm)

<HTML> <TITLE> CARGOMANAGER HELP </TITLE> <DOC name='ONE'>

This is info on Screen One <p>

This program is written using ClearWin+ and is available as a sample program. By browsing the text which follows you can explore many of the features of ClearWin+ (especially some new features, not yet found in the manual) simply by clicking on highlighted text describing items of interest to you. Some of the icons and bitmaps also respond to a click.<red> Please note that the use of this program is no substitute for reading the manual</red> - it is designed to give you a taste of what is possible using ClearWin+. <p>

This program is written using ClearWin+ and is available as a sample program. By browsing the text which follows you can explore many of the features of ClearWin+ (especially some new features, not yet found in the manual) simply by clicking on highlighted text describing items of interest to you. Some of the icons and bitmaps also respond to a click.<red> Please note that the use of this program is no substitute for reading the manual</red> - it is designed to give you a taste of what is possible using ClearWin+. <p>

<DOC name='SIX'> <h1>Packing Options</h1>

This is info on Screen 6.

Please Note: In addition to using this help system the FULL MANUAL contains a full search / history mechanism. The Help option contents on each screen focus on information of immediate relevance to the interpretation of the screen.

</HTML>

15 May 2007 7:22 #1933

Hi Bill,

I think that your html is missing a </HTML> and <HTML>

At the end of 'one' you need a </HTML> and new <HTML> before 'six'

as follows:-

. . . manual</red> - it is designed to give you a taste of what is possible using ClearWin+. <p> </HTML>

<HTML> <DOC name='SIX'> <h1>Packing Options</h1>

This is info on Screen 6. . . .

I hope this helps.

John 😄

16 May 2007 7:44 #1934

Dear John (and Paul),

Many thanks indeed for pointing out the error - the manual does state this quite clearly but I had assumed the DOC command alone was sufficient. Your solutions does, of course, solve the problem.

Most grateful for your assistance -

FYI - I am having to replace local help screens (originally .hlp) in an application - as a result of Vista not supporting them. As I already provide a fully searchable manual (compiled HTML) and the help screens are short and discuss just a single screen, the use of the Hypertext Window provides a simple solution.

Bill

Please login to reply.