How to run an external .exe file from an indesign pluging

Hi,
      Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.
Thanks,

I'm actully writing data in PMString to a external txt file.
another question..
if i want to execute an action when the ok button is cliked how can i do it?
whe i add a button(widget) i know how to handle it. please see my code.
// Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).
CDialogObserver::Update(theChange, theSubject, protocol, changedBy);
do
InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());
ASSERT(controlView);
if(!controlView) {
break;
// Get the button ID from the view.
WidgetID theSelectedWidget = controlView->GetWidgetID();
if (theChange == kTrueStateMessage)
//if (theSelectedWidget == kEXTCODGoButtonWidgetID
switch(theSelectedWidget.Get())
         case kEXTCODGoButtonWidgetID:
  this->ViewOutput();
  break;
         case kEXTCODFindButtonWidgetID:
  this->SaveLog();
  break;
// TODO: process this
} while (kFalse);
I do two actions "SaveLog" & "ViewOutput()" using two buttons. But i dont know how to execute an action when the ok button is clicked...

Similar Messages

  • How To Run An External .exe File With Command Line Arguments

    Hiya, could anyone tell me how I can run an external .exe file with command line arguments in Java, and if possible catch any printouts the external .exe file prints to the command line.
    Thanks.

    Using the Runtime.exec() command. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Can you call external exe file from Flex Air Application like notepad.exe

    Im trying to make my Air Application open an External exe file anyone know if this can be done?

    Hi,
    If you want to share code between a flex app and AIR, you
    could isolate the common bits as a swc file and link to the swc
    from both the flex and air project.
    Also, you could have the flex mxml file and air mxml file
    load the same module (which has the same stuff as your original
    flex application) using ModuleLoader.
    Or, you could even load the swf of your flex application
    using SWFLoader in your air mxml file.
    Basically, check out creating flex libraries, modules and
    runtime loading of swfs.

  • How to read an external XML file in a indesign Plugin?

    Hi All,
    Can you please guide in reading an external XML file in a indesign Plugin in MAC system. I am an windows user.We are using this file for reading some inputs.
    Thanks,
    Daniel

    Hello Daniel,
    I am uncertain about the actual question. If you are developing a plug-in or otherwise interfacing with the guts of ID, I suggest asking the question in the SDK forum:
    InDesign SDK Forum
    Otherwise, what is it you are wanting to know concerning importing XML into InDesign?
    Mike

  • How do I call another exe file from a Java program?

    Hi,
    I am doing a simple IDE (text editor/interpreter) for a simple programming language we are developing. It will be submitted as our project for this semester. I created an exe file (in C) which will be used as the interpreter. How do I call the interpreter from my IDE? The interpreter should run when the user clicks a button (i.e. the "Run" button). I've tried the Java Runtime class but it doesn't work. Anyone who knows how to do it?
    Thanks!

    I first tried to do a simple program that calls system commands such as dir, cd <dir>, etc.
    I do not have the exact code right now but as far as I can remember, here's what I wrote:
    class Sample{
        public static void main(String args[]) throws IOException{
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           String command;
           while ((command = in.readLine()).equalsIgnoreCase("exit") == false){
              try{
                Runtime.getRuntime().exec(command);
              }catch(Exception e){
                 System.err.println("Error: " + e);
          System.exit(0);
    }

  • How to run Executables or .bat files from Java?

    Hi!
    I need to open a Web Browser from Java App.
    Please, help me to do this without calling JNI
    -or-
    provide me with sample which works with
    Runtime.execute() method.
    I have done full permission:
    grant
         permission java.security.AllPermission "","";
    };Thank You in advance!

    To run any command from java code, the method is
    Runtime.getRuntime().exec( myCommandString )
    Where, myCommandString is something like "/full/pathname/command".
    If the pathname contains spaces, e.g. "c:\program files\windows\notepad", then enclose it in quotes within the quoted string. Or pre-tokenize them into elements of an array and call exec(String[] cmd) instead of exec(String cmd).
    From JDK1.3 there are two new overloaded Runtime.exec() methods. These allow you to specify starting directory for the child process.
    Note, there is a gotcha associated with reading output from commands. When the runtime exec's the process, it passes to it 3 streams, for stdin, stdout, and stderr; the out and err are buffered but the buffer size isn't very big. When your process runs, it reads (if needed) from in, and writes to out and err.
    If it doesn't write more than the buffer-size, it can run to completion.
    But if it tries to write more data to one or the other stream than the buffer can hold, the write blocks, and your process hangs, waiting for you to empty the buffer so it can write some more.
    So after the exec call, get the streams, and read from them in a loop until they both hit end-of-stream (don't block on either one, just read whatever is available from each, each loop iteration).
    Then when the streams have ended, call the process.waitFor() method to let it finish dying.
    Now, here is a code snippet how you achieve this.
    String strCommand = "cmd.exe /c " + strCommand;
    boolean bWait = true;
    //execute the command
    try
         Runtime r = Runtime.getRuntime();
         Process pr = r.exec(strCommand);
         Process pr = r.exec(callAndArgs);
         BufferedInputStream bis =new BufferedInputStream(pr.getInputStream ());
         int c=0;
         /** Outlet for IO for the process **/
         while (c!=-1)
              c=bis.read();
         /**Now wait for the process to get finished **/
         if(bWait == true)
              pr.waitFor();
              pr.destroy();
    catch(Exception e)
         System.out.println("Could not execute process " + strCommand);
         return(false);

  • How to call visual basic exe file from LABVIEW 7.1

    Hi all,
    I would like to call a visual basic 6.0 application(executable file) from labview 7.1 kindly anyone is having code or papers send me.
    Thanks and Regards
    rajesh

    Hi all,
    i would like to run a visual basic programme from labview , i have attached my file , even though iam executing the programme iam not able execute the vb file , kindly suggest me ,
    Regards
    rajesh
    Attachments:
    active x.vi ‏18 KB

  • How can I create multiple PDF files from multiple InDesign files?

    I have 144 InDesign files that I need to create a PDF file for each. I do not want to open each InDesign file to create the PDF's. Acrobat Batch create won't open the InDesign files. Is there another way?

    Only InDesign can do this. You may want to look at InDesign automation.

  • How to run exe file from inside java

    I wan to run an exe file from inside java code. How can I do it?
    Thanks

    Hi Oakam
    This is very simple. Just go through the given code below
    in place of FILEANDPATHNAME just give the exe's path and name
    Note :- adding ".exe " is not necessary
    public class exep
    public static void main(String args[])
    Runtime r = Runtime.getRuntime();
    Process p = null;
    try{
    p = r.exec("FILEANDPATHNAME");
    catch(Exception e)
    Give ur feedback
    Thanx
    Ottran

  • Running an exe file from java

    Hi , can anyone tell me how to run an exe file from my java program. the exe is in the same directory as my java files . When i click on a button i want to put something in the actionPerformed() method which will launch the exe file - prog.exe
    Hope someone can help me.
    Thanks Jim

    Hi !
    Look at the RunTime class...

  • How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    You can use a program like Carbon Copy Cloner.  It will clone your HD to the external.  The format is the same as your internal drive and you can boot from it using Option key at boot time.
    http://www.bombich.com/
    Regards,
    Captfred

  • HP Pravilion P6-2127c bought 10/14/2012/ Costco How do i open a gi file from a external passport

    just purchased HP Pravilion P6-2127c from Costco. How do I open a GI File from a external Passport

    Hi,
    You probably have to gurn to a CD or DVD first:
       http://www.ehow.com/facts_5682543_file-extension-gi_.html
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Run EXE File from Developer

    hi all
    i am looking for code to run a program(any EXE File ) from developer Form (Developer 6i)
    thanks a lot

    look at the documentation for the HOST command in Forms.
    Regards
    Grant Ronald
    Forms Product Management

  • I mistakenly deleated itunes exe file from my laptop, how can I download it again?

    I mistakenly deleated itunes exe file from my machine, how can I downlad it again? Its not available on the apple page.

    Google "iTunes".
    If you already installed iTunes you no longer need the .exe file.

  • How do i back up my files from an intel core duo imac to an external hard drive?

    Hello
    How do I back up my files from an intel core duo imac to an external hard drive?

    Like you do with any other Mac*:
    http://www.macmaps.com/backup.html
    Note: if you have a CoreDuo, you can only upgrade up to 10.6.8.  Only Core2Duos and higher can go to 10.7 (Lion).

Maybe you are looking for

  • Time machine back up failed on my external drive & more problems

    Hi, I'd be grateful for any help. I have a G-TECH 1TB external drive (7 months old) and decided to use that with Time machine to back up my files. I hadn't used the drive for about 4 months but it had worked fine the last time I used it. I connected

  • What is a lock in a synchronized method ??

    Greetings, I have a synchronized reset method whose job is to reset every variable i am using in that class.. its a synchronized method so when i am doing the reset stuff, no other method in that class can update that variable. But someone told me i

  • Attempting to remove a modal popup and the modal blur remains

    Hi im working with modal windows which are created in the follow way: PopUpManager.createPopUp(this, MyPage, true, PopUpManagerChildList.POPUP) Sometimes when removing the popup the modal blur remains and the other components remain unclickable. im r

  • HT1386 itunes iphone syncing issues

    itunes does not see iphone even when connected with usb cable. any help

  • Appointment in service process - BUS2000116

    Hi All,   I need to attach the appointment details while creating the service process transaction of business object BUS2000116.   I am using BAPI : BAPI_BUSPROCESSND_CREATEMULTI for creating my service process transaction.   I however know APPOINTME