Announcement

Collapse
No announcement yet.

how to call PBWin.CHM with a topic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to call PBWin.CHM with a topic

    As in calling it from an external editor. I've looked around abit and tried a few things but all I get is the start screen (Keyword quick finder).

  • #2
    To call via an index keyword:
    Code:
    ' Build the HtmlHelp's Keyword look up UDT
    kw.cbStruct = SizeOf(kw)
    kw.fReserved = 0
    kw.pszKeywords = StrPtr(skey)
    kw.pszUrl = 0
    kw.pszMsgText = 0
    kw.pszMsgTitle = 0
    kw.pszWindow = 0
    kw.fIndexOnFail = 1
    
    ' Show the HtmlHelp's index tab and the keyword to lookup (topic)
    HtmlHelp hWnd, ByCopy sHelpFile, %HH_DISPLAY_INDEX, StrPtr(sKey)
    HtmlHelp hWnd, ByCopy sHelpFile, %HH_KEYWORD_LOOKUP, VarPtr(kw)
    To display via a map number:
    Code:
    HtmlHelp hWnd, ByCopy sHelpFile, %HH_HELP_CONTEXT, MapNumber
    To display via a topic filename:
    Code:
    HtmlHelp hWnd, ByCopy sHelpFile, 0, STRPTR(Topicfilename)
    Sincerely,

    Steve Rossell
    PowerBASIC Staff

    Comment


    • #3
      Thanks Steve.

      Comment


      • #4
        >> calling it from an external editor...

        If the external editor was EditPlus: go to Tools/Preferences/Tools/User tools, Add Tool>> of type "HTML Help File (*.chm)".

        The word at the cursor position is searched for in the help file when the tool is selected (button-click / hot key).

        See comments in source code organisation thread for linking to help topics in SDK documentation using H2Viewer.exe from within the editor.
        Rgds, Dave

        Comment


        • #5
          Thanks Dave.

          Comment


          • #6
            >calling it from an external editor

            Is this a pemitted use under your license?

            The help file is, after all, part of the licensed software product.

            I'll guess it is a permitted use, since you can always view a "CHM" file from Windows, but it's just the kind of thing one SHOULD think about before using a licensed product as a component of one's own products.

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Offhand my guess would be that it's an encouraged use. Third party products are part of the strength of a compiler like PowerBasic.

              Barry

              Comment


              • #8
                Originally posted by Michael Mattias View Post
                Is this a pemitted use under your license?
                no idea, but what I do with the product in the privacy of my own office is between me and it!
                Last edited by Chris Holbrook; 11 Jan 2009, 04:28 PM.

                Comment


                • #9
                  no idea, but what I do with the product in the privacy of my own office is between me and it
                  That MAY be true of your PowerBASIC Inc. license (the license in the help file is not terribly complete in that it says nothing about allowed use), but that would NOT be true of the license granted by all publishers for all products!

                  I guess I owe you an example:
                  The use of components of the software supplied in Microsoft Portable Executable Format (that is, as "EXE" or "DLL" files), including separately licensed map files, in any manner other than as a component of the PPPS in normal operating mode is strictly prohibited; except the main executable program ("ppps.exe") may without registration or royalty be used as the object of any Licensee -owned or -licensed "menu" or "task management" software .

                  This prohibition may be extended by Licensor at Licensor's sole discretion to include additional system components; however, Licensor guarantees in perpetuity the exception for the use of the main executable program as the object of menu or task management software.
                  Last edited by Michael Mattias; 11 Jan 2009, 05:20 PM. Reason: Add example
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Originally posted by Michael Mattias View Post
                    Microsoft...prohibited...
                    Microsoft are fixing breaches in the town walls while their enemies trade in the market square.

                    I don't think I would use any M$ product if I could use a different one. I'm using Windows out of necessity!

                    Comment


                    • #11
                      What I posted has nothing to do with Microsoft.

                      Those are MY rules for the use of The Provider Payment Partner(tm) System

                      My bigger point is, whenever you use a piece of licensed software for anything, you should always check your license to see if your proposed use is in fact a permitted use.
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Originally posted by Michael Mattias View Post
                        What I posted has nothing to do with Microsoft.

                        Those are MY rules for the use of
                        In which case I don't suppose I will be buying one of those, either.

                        Comment


                        • #13
                          Originally posted by Michael Mattias View Post
                          What I posted has nothing to do with Microsoft.

                          Those are MY rules for the use of The Provider Payment Partner(tm) System

                          My bigger point is, whenever you use a piece of licensed software for anything, you should always check your license to see if your proposed use is in fact a permitted use.
                          The question of this thread was, how to use the PowerBasic Online Help File from a 3rd Party Editor ... The purpose of the PowerBasic Online Help File is to help the PowerBasic Programmer to use PowerBasic. It is not forbidden to start a help file from outside the PowerBasic IDE, so it is allowed to start it from any other editor if the user self has bought powerbasic.

                          There is even a online HTML Helpfile on the homepage isn't it ?
                          Regards,
                          Hubert

                          ------------------------------------
                          http://familie-brandel.de/index_e.html

                          Comment


                          • #14
                            Well, I was not really expecting you to buy a PPPS license.

                            The PPPS is of absolutely zero use unless you have to deal with the HIPAA EDI transaction sets, which are not used in the UK.

                            You think those terms are "restrictive" you haven't seen the rest.

                            The PPPS parses the ANSI X12N X091A1 remittance into a relational database; from that DB it performs inquiries and creates print reports. A PPPS user license does not permit you to use the database as a source for your own queries and reports except for your own use... that is, you can't use the PPPS to open a service bureau. There are about 400,000 healthcare providers in the USA, and many would prefer to have a service bureau handle the data and provide them with the print reports which have been in use here for about twenty-five years.

                            However, I DO offer a Service Bureau License (in HIPAA terms such a service bureau is called a "Health Care Clearinghouse"). That one includes something I KNOW is "really popular" (NOT!) around here.... royalty reporting and payment.



                            MCM
                            Michael Mattias
                            Tal Systems (retired)
                            Port Washington WI USA
                            [email protected]
                            http://www.talsystems.com

                            Comment


                            • #15
                              Back On Topic ..

                              If your editor has provision for user tools (but not automatic help tools) you could use something like this (based on Steve's post):
                              Code:
                              #COMPILE EXE "FindHelp.exe"
                              #Dim All 
                              #INCLUDE "WIN32API.INC"
                              #INCLUDE "HTMLHelp.inc"
                               
                              Function PbMain()
                               Local Res  As Long
                               Local kw   As HH_AKLINK
                               Local sHelpFile, sKey As String 
                               
                               sHelpFile  = command$(1)
                               sKey       = command$(2)
                               
                                ' To call via an index keyword:
                                ' Build the HtmlHelp's Keyword look up UDT (HH_AKLINK)
                                kw.cbStruct = SizeOf(kw)
                                kw.fReserved = 0
                                kw.pszKeywords = StrPtr(skey)
                                kw.pszUrl = 0
                                kw.pszMsgText = 0
                                kw.pszMsgTitle = 0
                                kw.pszWindow = 0
                                kw.fIndexOnFail = 1
                               
                                ' Show the HtmlHelp's index tab and the keyword to lookup (topic)
                                If HtmlHelp (0, ByCopy sHelpFile, %HH_DISPLAY_INDEX, StrPtr(sKey)) Then
                                  Res = HtmlHelp (0, ByCopy sHelpFile, %HH_KEYWORD_LOOKUP, VarPtr(kw))
                                Else 
                                  MsgBox "e.g. call with Path$\FindHelp.exe C:\PbWin90\Bin\PBWin.chm CBCTL)", ,"Missing command line Params?"
                                End If
                               
                                While IsWindow(Res) 
                                 Sleep 100
                                Wend
                               
                              End Function
                              '------------------/PBMain
                              'Demo Program to call FindHelp.exe 'tool' - adjust paths to suit etc
                              #IF 0
                              Function PbMain()
                               
                                ProcID??? = Shell ("C:\PBWin90\FindHelp\FindHelp.exe C:\PbWin90\Bin\PBWin.chm CB.CTL")
                               
                              End Function
                              '------------------/PBMain
                              #ENDIF
                              (But feel free to check with a lawyer first )
                              Rgds, Dave

                              Comment


                              • #16
                                Code:
                                  =====  USER OPTIONS =====
                                
                                  OPEN on F1   [c:\pbwin90\bin\pb.chm]   [X] Pass word at cursor as help topic
                                
                                ' =======================
                                Totally divorced from proprietary software. That is, YOUR design is not using any licensed products!


                                MCM
                                Michael Mattias
                                Tal Systems (retired)
                                Port Washington WI USA
                                [email protected]
                                http://www.talsystems.com

                                Comment


                                • #17
                                  Steve's post in reply didn't use any licensed products either...like was already said, I believe the help files are free to download, other 3rd Party apps already do it, and anyone can just double click the file to open it themself, so why can't an application? It is not like he was saying "How can I add the PB Help file to my app". If he is developing a 3rd party editor for PB, then his audience will have PB and a license to use it. If they don't have it then his product won't do them much good.

                                  Shoot, maybe in the process he can figure out why sometimes the Help Windows do odd things like reusing the wrong window or frame.
                                  sigpic
                                  Mobile Solutions
                                  Sys Analyst and Development

                                  Comment

                                  Working...
                                  X