Skip to main content
Participant
October 12, 2012
Question

System call from framemaker customized menu

  • October 12, 2012
  • 2 replies
  • 1071 views

Hi,

I am trying to create customized menu in frammaker and execute an external script through the menu selection.

So, i have modified the  customised.cfg file and able to get the menu options in framemaker.

But when i try to call the external script using the below command in the cfg file

<Hypertext message winexec C:\Temp\CCIntegration\test.bat>

The test.bat file is just getting opened but not getting executed. Is there anyway, i could execute the external batch script or any other script through menu selection.

Please help

Thanks & Regards

Kesini

    This topic has been closed for replies.

    2 replies

    K.Daube
    Community Expert
    Community Expert
    October 15, 2012

    Hi Kesini,

    I have done a lot of such modifications (see http://www.daube.ch/docu/fmaker66.html) and learned that the set of hyptertext commands which can be used is limited.

    Whenever You use a relative path, this is relative to the currently open document (not to the FM-installation dir).

    To open a file with its associated program use

       <Command newcommand <Label menu-label>

               <Hypertext message openfile complete_file_path_including_extension>>

    for example:

        <Command _maker.ini <Label Display maker.ini in $HOME$>

                <Hypertext message openfile +fm-root+/maker.ini>>

    *** +fm-root+ must be extended to the real path of the FM-installation

    To execute a program use  the same command, for example:

        <Command _maker.ini.user <Label Edit maker.ini in User area>

                <Hypertext message openfile +fm-root+/fminit/configui/GetUserIni.exe>>

    *** The program GetUserIni.exe is a compiled AutoHotKey script to find the file in the user-area and open it (in an editor)

    You may get useful information from http://www.daube.ch/docu/files/etb-customising-fm.pdf .

    KesiniAuthor
    Participant
    October 18, 2012

    Hi Daube,

    Before i try this, i realized that the open is working based on the Windows -> Default programs setup. Once, i modified it, i was able to execute the batch script using the below command

    <Hypertext message system C:/CCIntegration/checkout.bat>

    I will keep this mind, anyways.. Also, checking on the pdf . thanks a lot!

    Also, one more question on this.

    any idea, how we can get the open filename in a variable and pass this as parameter upon script execution ?

    I mean, want to do something like this

    $fullfilename="Get the Full name of the file"

    <Hypertext message system C:/CCIntegration/checkout.bat '$fullfilename'>

    Please help!

    Thanks a lot

    Regards

    Kesini

    vishu_13
    Inspiring
    October 12, 2012

    Hi Kesini,

    Check the blog mentioned below, it might help you in order to resolve this

    http://blogs.adobe.com/tcs/2011/03/framemaker/create-your-own-custom-menus-for-framemaker.html

    Thanks

    VJ

    KesiniAuthor
    Participant
    October 18, 2012

    Hi VJ,

    I had already referred the link. It do not contain the required  information

    Thanks !

    Kesini