Results 1 to 4 of 4

Thread: External links - console app - batch file - .bat - passing param

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    25

    Default External links - console app - batch file - .bat - passing param

    Hi,
    My title is constructed to be search friendly. The bottomline is that I am trying to link externally to the words.exe (Latin/English) which is a console app - that is on windows, it runs in a command shell (like a "DOS" window).

    Most BW users use this tool via a website- the entry in shellexec init file would like like this:

    [Latin lookup in WORDS]
    Operation = Open
    Directory = NULL
    File = http://lysy2.archives.nd.edu/cgi-bin/words.exe?<dummy>
    Parameters = NULL
    MenuLocation = Browse Window Latin
    TextType = Latin Text
    MapToVersion = NULL
    Lookup = Form
    MenuText = Latin lookup in WORDS
    Enabled = 1

    However, I do not have an internet connection at my home, so I have tried something like this to no avail:

    [Latin lookup in WORDS]
    Operation = Open
    Directory = c:words
    File = c:\words\words.exe
    Parameters = NULL
    MenuLocation = Browse Window Latin
    TextType = Latin Text
    MapToVersion = NULL
    Lookup = Form
    MenuText = Latin lookup in WORDS
    Enabled = 1

    The closest I can get to getting it to work is by specifying a batch file that spawns words.exe:

    [Latin lookup in WORDS]
    Operation = Open
    Directory = NULL
    File = c:\words\runwords.bat
    Parameters = NULL
    MenuLocation = Browse Window Latin
    TextType = Latin Text
    MapToVersion = NULL
    Lookup = Form
    MenuText = Latin lookup in WORDS
    Enabled = 1

    My batch file looks something like this:

    cd c:\words
    words.exe %1

    The %1 is the first argument sent to the batch file. It is not getting populated. I can explicitely pass an argument in the Parameters field, e.g.: Dominus. This works, but of course, I want the external links to pass the form of the Latin. I tried specifying <Form> both in the parameters field as well to no avail. At least I can cut and paste the Latin form into the console window, but it would be great if I could get this argument passed.

    Anyone know why this doesn't work?
    Has anyone successfully gotten the external links to spawn a console app in a command window?

    Thanks,
    Steve MacKenzie
    Bellevue, WA USA
    Last edited by Comet; 12-18-2007 at 03:16 PM.
    Steve MacKenzie
    Bellevue, WA

  2. #2
    Join Date
    Apr 2004
    Posts
    2,030

    Default

    Steve,

    I wrote a simple console application and accessed it through the ELM without any problem. Of course, all my app does is print a line of text to the screen, but that shouldn't make any difference if I understand your issue properly. Here are the lines in ShellExec --

    //
    // External Link #10
    //
    [Jesus Is Coming]
    Operation = Open
    Directory = NULL
    File = c:\Programming\jesus_is_coming.exe
    Parameters = -v <book> <chapter>:<verse>
    MenuLocation = Browse Window All
    TextType = Bible Verse
    MapToVersion = KJV
    Lookup = Verse Reference
    MenuText = Jesus Is Coming
    Enabled = 1

    I don't know if you merely made a typo or if your "Directory" line is exactly as you typed it (in your second example), but it looks like that could be part of your problem.

    Also, you can play with the "MenuLocation" and "Parameters" variables and see what happens. Try keeping all the variables I have listed and see if that works.
    Last edited by Adelphos; 12-21-2007 at 10:09 PM.

  3. #3
    Join Date
    Apr 2006
    Posts
    25

    Default

    Sure, I can pass book and verse, but I need to pass "form" (the Latin text that I am right clicking on)

    Thanks
    Steve MacKenzie
    Bellevue, WA

  4. #4
    Join Date
    Apr 2006
    Posts
    25

    Default

    No, the problem must be that the arguments do not get passed in that scenario. Maybe we can have the fellows fix it
    Steve MacKenzie
    Bellevue, WA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •