How to call webhelp from C#

I don't want to seem too simplistic, but I've spent at least
2 hours trying to call webelp files from c#, without any luck at
all. All I ever get is three little beeps from my computer, and the
IE browser never shows up at all. Here is some background
information:
I read all the documentation, beginning to end.
(On WinHelp_4) I compiled up the CSH_CS (csharp version)
project, and am able to call my simple RH WinHelp file (Dummy.chm)
just fine, using a primary url of "c:\\Docs and
Settings\\etc\\RoboHelp 6.0\\Dummy\\!SSL!\\WinHelp_4\\Dummy.hlp". A
MapID = 1 is required in the CSH test dialog in order for my help
file to load. This loads my help from the little CSH test dialog
fine.
(On WebHelp) After getting the WinHelp_4 version to work, I
switched the primary output to WebHelp in the SingleSource Layout
section, and specified that RH should create a subdirectory
(HTMLHelp) to store the WebHelp files. I regenerated the project,
and successfully viewed the resulting web output using the View
Results or the View Primary Layout on the RH toolbar. So I'm
thinking my help files are ok. But..... I can't get the WebHelp to
display from the CSH test dialog, no matter what I try.
Currently I am using roughly the same primary URL in the CSH
c# project: "c:\\Docs and Settings\\etc\\RoboHelp
6.0\\Dummy\\HTMLHelp\\!SSL!\\WebHelp\\Dummy.htm". I do not append a
window >main to end of the primary URL. It doesn't matter if I
use a MapID of 1 or blank. It doesn't matter if I choose Context,
Index, Search, etc. No matter what combination of things, the help
file will not show. The file exists---if I double click the
Dummy.htm file, the help file loads immediately in IE.
So my help files seem ok, and the CSH_CS code seems ok (at
least it works with WinHelp_4). All I have changed is the path to
my help file. (Oh, and I tried to point at an existing example
*.htm in the RH Samples directory, with the same results---just a
couple of little clicks from IE (presumably to say "There's an
error somewhere").
Could anyone give me specific instructions on what I might
try to solve the problem? I'd like to know the specific syntaxes
for using windows, and MapIDs in my URL string too, if you know
that. Here is what I think they are:
url = "Startpage.htm" - to load the whole help system
url = "Startpage.htm>main" - to display in a particular
window
url = "Startpage.htm<id=2" - to display mapid 2
Thanks for your help

Well, another hour and a little more progress. Now I can
display WebHelp from C# through the RoboHelpAPI (although it seems
pointless, because of the bugs and problems in the CSH_CS example
program and IE web browser popup window problems). First, here is
the code that displays the WebHelp system (from the top level, in a
standalone IE browser instance)
// try 2
int cmd = CRoboHelpAPI.CSH_DISPLAY_CONTEXT;
CRoboHelpAPI cHelp = new CRoboHelpAPI ();
int ID = 1; // context id; the number doesn't matter at all
string foobar;
foobar = "C:\\my pathname\\RoboHelp 6.0";
foobar += "\\Dummy\\HTMLHelp\\!SSL!\\WebHelp\\Dummy.htm";
string second = foobar;
cHelp.RH_AssociateOfflineHelp (foobar, second);
cHelp.RH_ShowHelp ((int) this.Handle, foobar, cmd, ID);
return;
From RoboHelp_CSH_CS.cs:
// reset the command
switch (nCommand) {
case CSH_DISPLAY_CONTEXT:
// notice that I commented this line out -- this is what
allows it to "work"
// This is also why the ContextID number above doesn't
matter--we ignore it.
//strHelpURL += "#<id=" + nData.ToString();
break;
From RoboHelp_CSH_CS.cs:
public static IWebBrowserApp
GetBrowser () {
for (int nIdx = 0; nIdx < 2; nIdx++) {
try {
if (m_cExplorer == null)
m_cExplorer = new InternetExplorer ();
if (m_cBrowser == null)
m_cBrowser = (IWebBrowserApp)m_cExplorer;
// I had to add this code myself, because the browser is not
made
// visible by the Adobe CSH_CS.cs example program. A defect,
// in the example program, for sure.
==> m_cBrowser.Visible = true;
So to summarize, if you fix the CSH_CS example code (1) to
make the browser visible, and (2) to ignore the contextID number,
the code in this posting will show your WebHelp system in a new IE
window, with the usual TOC frame on the left, and the topic window
on the right, in a main window. But wait... there's more...
IE POPUP WINDOWS
The example above commented out some code under the case
branch for CSH_DISPLAY_CONTEXT. The code appended some extra
characters to the URL to tell the browser to display a specific
page, rather than just the start page. Similarly, the code for
CSH_DISPLAY_TOC/INDEX/SEARCH branches also appends characters to
the URL, to tell the browser to display a specific page in the help
system.
The problem with all of this is that IE treats all these
single page displays as pop-up windows, and blocks them. So that's
why in my original case at the top of this posting I only heard a
couple of clicks (and saw nothing) when I tried to display my
WebHelp. I saw nothing because the browser was not made visible by
the code. I heard the two double clicks (click-click, click-click)
because IE "plays a sound when a pop-up window is blocked".
So there will probably be a big policy collision on user
desktops if your C# app tries to display specific web pages in
WebHelp. If users want to block popups for general web surfing,
they can't see specific WebHelp pages, and vice versa. Ugh.
One possible workaround is to tell IE to "Always display
popups in separate tabs" (in Options/General/Tabs/Settings). I
tried this setting, and then uncommented my CSH_DISPLAY_CONTEXT/etc
code blocks. As expected, all the appended characters on the URLs
forced the display of specific pages, which meant that IE treated
them as popups, and forced them into new tabs.
So what you actually see is
(1) a new instance of IE becomes visible,
(2) the pathname to the help system (plus appended control
characters) is shown on the first tab (in my case,
file:///C:/Documents%20and%20Settings/kkkwj/My%20Documents/RoboHelp%206.0/Dummy/HTMLHelp/ !SSL!/WebHelp/whcsh_home.htm#id=2).
This is odd, because the primary URL I fed in to the API in the
code above was "C:\\...path\\Dummy.htm" (with a ContextID = 2
parameter). I have no idea how my Dummy.htm was changed to
whcsh_home.htm by the API. Go figure. I suppose the switch takes
place if appended characters are found on the end of the URL, and
the switch is done to support context IDs somehow.
(3) the desired page is displayed in a separate tab in IE.
My conclusions are that:
(1) Adobe should fix their examples to save people all this
headache. They should fix the code, make the browser visible, and
provide some nice documentation on what the secret syntaxes are for
the appended characters (<id=, cmd=idx, cmd=fts, cmd=toc,
<windowname), how and when you should use the secret syntaxes in
the URLs you feed into the RH API, how the whcsh_home.htm switch
works to support appended characters, what will happen on the user
end with popups if you use appended characters, and the policy
collisions that will result, and a recommended course of action for
developers.
(2) The hassle with the popups just isn't worth it. So I will
be calling my help system from the top level all the time, and will
forego the utility of context sensitive help. It's WAY too much of
a problem with WebHelp. (Of course, context sensitive help works
great with the old WinHelp_4, but WinHelp_4 has other limitations.)
What a long process to debug all this stuff. Adobe fell way
short on this one. But hopefully others can use my postings here in
a time of need. (Thanks to Adobe for the forums, and for Peter's
fast response.)

Similar Messages

  • Related documents or links on how to call webservices from WDJ

    Hi all
    i need documents & links on how to call webservices from Webdynpro for Java.
    if anybody send the documents on sample scenarios on the same then it is the great help to me...
    Thanks
    Sunil

    Hi Sunil,
    May these links help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/f289c67c759a41b570890c62a03519/frameset.htm
    http://help.sap.com/saphelp_nwce10/helpdata/en/64/0e0ffd314e44a593ec8b885a753d30/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm
    and  the below thread to call weservices in java.
    Re: How to call a web service from Java
    Regards,
    Supraja

  • Calling WebHelp from JS doesn't display content in frames

    Hi,
    We are using WebHelp on a UNIX server run from the cloud, to replace the original spartan-at-best, flat-HTML help content that was released with a web-based program, all of which was "context-sensitive" via mapping to #Name destinations within the old help  web page. To make it work, we have a JavaScript that maps the old #Name destinations to the new WebHelp MapIDs and redirects the old help web page to a subdirectory that has the WebHelp output files. But, it's not working correctly. If we invoke WebHelp via
    HH_DISPLAY_TOC, the new WebHelp opens within the frameset, but the context-sensitive mapping doesn't work.
    The programmer says we need a way to call help using a URL. So, I sent him what it says in the RH help system for programmers:
    RH_ShowHelp(0, "IQ_Help/util_en.html", HH_HELP_CONTEXT, HelpTag)
    I also sent him a PDF of the RH help topics for programmers about calling WebHelp.
    From what I gather reading the JavaScript (and I am NOT a programmer), he has set HelpTag as the variable for the Map ID that is provided in a .properties file.
    Tried unsuccessfully using the following ways of calling it (not as sequential lines of code, but as replacement methods of the same line of code):
    RoboHelp_ShowHelp(http://[servername]/IQ_Help/util_en.html, 0)
    RH_ShowHelp(0, "IQ_Help/util_en.html>UUGuide%20SPi",HH_HELP_CONTEXT, HelpTag)
    RH_ShowHelp(0, "IQ_Help/util_en.html>UUGuide%20SPi",HH_DISPLAY_TOC, HelpTag)
    http://[servername]/robohelp/rest/robowindow?wtype=ctx&context=HelpTag <-as a call to URL
    I'm sorry, I'm looking like a real idiot around here -- I really don't know much at all about Java or JavaScript, and I have never had to direct a programmer through how to get the help call to work, and I'm at the end of his patience with me... I don't know where else to turn...I need some insight from YOU.
    I thought about providing the text of the JavaScript here, but I don't know for sure whether it would show up as text, or how to make it an attachment that's safe. Please tell me...?
    Thanks in advance,
    Rene

    Hi there
    If all they want is to use URLs, see if this helps...
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to call LSMW from a Report program

    Hi,
    I have a requirment of extending vendor master data (Companycode data and Purchasing Organization data ) through Tcode XK02 using LSMW.Also I need to generate an error log file for validating the data from flat file and  must have an export option of the error log file.
    Can you help me how to proceed on this in steps.
    Also pls let me know how to call LSMW transaction through a Report.
    Based on the selection criteria I need to maintain two source structues,one for companycode data and the other for Purchasing Orgnization data for uploading  data thru LSMW.How to do this?
    pls respond ASAP,
    Thanks,
    Nagendra

    Hi,
    create 2 LSMW object (under same project and subproject)..
    one for extended vendor master data for company code data and other for  extended purchase organization data for company code data.
    Now check the radio buttons and based on that populate ur LSMW object.
    Store project
      project = < >.
    Store subproject
      subproj = < >.
    Store object
      object  = '6GSC022_TS3'.
    if r_ccode = 'X'.
    Store object
      object  = < >.
    else.
    Store object
      object  = < >.
    endif.
    Call the function module to display object (LSMW) maintenance screen
      CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
        EXPORTING
          project        = project
          subproj        = subproj
          object         = object
        EXCEPTIONS
          no_such_object = 1
          OTHERS         = 2.
    Generating error log:
    After the checking the field if u think for this u need to generate error message then In the Maintain Field Mapping and Conversion Rules option under the required field write the following code:
    data: v_msgtxt(100) type c.
    message  <msg ID>    <message type>   <message no>
                     with   <var1>  <var2>
                     into v_msgtxt.
    write v_msgtxt.
    Follow the next step in LSMW object till you reach the option  Convert Data.
    After you execute this option you will get the desired message here.
    Regards,
    Joy.

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to call BAPI from ABAP Inbound Proxy

    Hi All
    Can some one provide/giude  a sample code on how to call a BAPI from generated Method (Inbound Proxy) and how are the table parameters passed from Proxy to BAPI.
    Thanks
    Ravi/

    Hello Ravi,
    In the proxy before calling the BAPI, construct the table, fill it with the appropiate values by lopping over the proxy request object. Now use this table for calling BAPI
    Cheers,
    Naveen

  • How to call RFC from Power Builder

    Hi,
    I am using Power Builder Tools and I want to know how can i call RFC from Power Builder
    Thanks for ur reply

    Hi,
    Although I have not worked with Powerbuilder, I am sure if you have a certain level of proficiency with it, you will be able to code your logic that will call your wrappers written in VB/C/.NET etc. Check out the wonderful weblog by Thomas Jung on integrating ActiveX controls with ABAP Control Framework at https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/995. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Do get back if you have further queries.
    Regards
    Message was edited by: Shehryar Khan

  • How to call webservice from Java application

    Hi XI gurus
    Pls let me know how to call a webservice from Java application.
    I wanted to build synchronous interface from Java Application to SAP using SAP XI
    For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
    Regards
    MD

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • How to call GET_SEARCH_RESULTS from Filter Class

    Hi All,
    I want to call GET_SEARCH_RESULTS from Filter Class. How can we do? Any sample code.

    Hi Mohan,
    I am using "preComputeDocName"
    public int doFilter(Workspace ws, DataBinder binder, ExecutionContext cxt)
    throws DataException, ServiceException
      String dType=binder.getLocal(UCMConstants.dDocType);
      if(dType.equals("CIDTest"))
       if(binder.getLocal("IdcService").equals("CHECKIN_NEW"))
        String filename=binder.getLocal(UCMConstants.primaryFile);
        originalFileName=filename.substring(filename.lastIndexOf("\\")+1);
        SystemUtils.trace(trace_checkin, "org::"+originalFileName);
        DataBinder newDB = ucmUtils.getNewBinder(binder);
        newDB.putLocal("IdcService", "GET_SEARCH_RESULTS");
        newDB.putLocal("QueryText","dDocType <starts> `"+dType+"` <AND> xcidfilename <starts> `"+originalFileName+"`");
        ucmUtils.executeService(ws, newDB, true);
        DataResultSet docInfoDrs = null;
        docInfoDrs = (DataResultSet) newDB.getResultSet("SearchResults");
        if(docInfoDrs.getNumRows()!=0){
         throw new ServiceException("file is not unique");
        binder.putLocal("xcidfilename", originalFileName);
        return CONTINUE;
    return CONTINUE;

  • How to call ExportCollectionActionListener from bean

    In my scenario, I have to get a confirmation from user as "Are you sure you want to export table data to excel document?"
    And when user clicks "YES", the data should be exported.
    And I'm trying to achieve this using bean method, where in I can know whether user clicked "YES" or "NO".
    But in here, how to call the "ExportCollectionActionListener" ?

    check [url https://blogs.oracle.com/jdevotnharvest/entry/invoking_af_exportcollectionactionlistener_from_java]Invoking af:exportCollectionActionListener from Java 

  • How to call infotypes from webdynpro applications

    Hi friends
    My requirement is, I need to call infotypes in r/3 system. Exact requirement is I got a dropdown, which gets the data from infotype, I got a textview which also gets the the data from other infotype.My question how to call  these infotypes. Is this is the same way like importing bapis or different. Please let me know the detail procedure, and any doccuemnts mail me to [email protected]
    Regards
    keerthi

    Hello Keerthi,
    it is no special way to call infotypes, you have to find a Bapi which return data you want (or part of this thata). When there is no Bapi which fill your requirements (or you must call to much bapis) i think you should write your own bapi. Last step is using this (own or found) in wdp.
    Regards
    Bogdan

  • How to call infotypes from webdynpro application

    Hi friends
    My requirement is, I need to call infotypes in r/3 system. Exact requirement is I got a dropdown, which gets the data from infotype, I got a textview which also gets the the data from other infotype.My question how to call these infotypes. Is this is the same way like importing bapis or different. Please let me know the detail procedure, and any doccuemnts mail me to [email protected]
    Regards
    keerthi

    For reading HR infotypes you have to do the following
    a. Create a Remote enabled function module (FM) in the HR syste. This FM shall wrap the standard FM HR_READ_INFOTYPE.
    b. Create a Model in your webdynpro project for the FM you developed in step a.
    Thanks and Regards,
    Prasanna Krishnamurthy

  • How to call webservices from ADF page

    Hi,
    I am using ADFBC.
    I want to call webservices from ADF page.please give examples of sample program on how to call a web service from the ADF pages.please give examples.
    please help me.
    Thanks,

    http://marianne-horsch-adf.blogspot.com/2011/03/how-to-create-web-service-based-adf.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/70-dependent-listboxes-using-ws-286107.pdf
    http://www.oracleimg.com/technetwork/developer-tools/jdev/adfcomplexwstypes-101013.html
    http://technology.amis.nl/blog/9726/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components
    http://oracamp.com/passing-parameters-between-web-services-and-jsf-pages

  • How to call webservices from IDM

    Hi,
    can anyone provide some documents how to call a web service from IDM 7.1
    Thanks in Advance
    Regards,
    mary

    There is an easy way to do it. Just use JavaScript and Java based webservice.
    Copy the webservice jar in location where the IDM console is located.
    Add path to jar file in IDM console configuration.
    If your webservice looks like this:
    Import jar in your JavaScript code like this:
    Execute it like this:
    Best Regards,
    Ivan

  • How to call Servlet from jsp page and how to run this app using tomcat..?

    Hi ,
    I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
    Please tell me how to do this into jsp page..?
    Also i wanted to execute this application using tomcat.
    Please tell me how to do this...? what setting are required for this...? what will be url ..??
    Thanks.

    well....my problem is as follows:
    whenever i type...... http://localhost:8080/appName/
    i am getting 404 error.....it is not calling to login.jsp (default jsp)
    but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
    Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
    In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
    plz help me.

Maybe you are looking for

  • Access sequence for partner determination

    Hi, I have created a new partnerfunction in CRM Online and assigned it to an existing partner-determination. Addtionially I use the standard access sequence '0004 User' for partner determination. The partner must not be changeable in the sales transa

  • Dashboard does not open in Mavericks

    I updated my MacPro from Mountain Lion to Mavericks using the download from the app store. Since this update, the Dashboard will not open.

  • Is iMac Drive dead?

    I think my 2007 24" iMac HD is dead, want to confirm. Cannot open in recovery HD, get folder with question mark on start up.  Startup from ext HD, it appears in disk utility with name of "media".  I cannot use repair or verify disk since the are grey

  • Can we add search filters to CV04N?

    Hi, What i am being asked to do is add different search filters to CV04N. Is it possible to add a search field at CV04N? My customers case: "We use CV04N to track vehicle software editions. What we need is a screen that we can track software edition

  • How to set & use digital trigger for AIN on a DAQmx?

    1) How I configure a task to allow a digital input line to trigger a AIN reading in VB6.0 with a USB-6210? 2) To help me answer the above I created a task in Measurement & Automation Explorer that used a digital trigger (TRIGGER TYPE= DIGITAL EDGE, T