Command line arguments?

I`m writing some automation software to open specific files from specific location when a barcode is scanned. I have it all working but unfortunately it loads a new instance of coreldraw each time. I can't use DDE since the automation software uses the programs command line arguments and I can't find these through google.

Does anyone know what the argument would be for opening files (in the same instance)?

I`m hoping there is a command line argument for this.

 

  • I had a quick look around, but the only mention of command line switches I can find relates to installation rather than execution.

    • But I have a possible alternative that might work with your program ...

      I guess your program is currently executing something like

      "C:\Program Files\Corel\CorelDRAW Graphics Suite X4\Programs\CorelDRW.exe" c:\tmp\test.cdr

      But if you omit the program and execute just the filename, ie

      c:\tmp\test.cdr

      then windows will look up the appropriate file association, determine that CorelDraw is already running and will probably open the file in the same instance. I can't say for certain, but it does from the dos prompt (with X4 and windows XP).

      • Thanks, that should work for cdr files well. Now I just have to work out how to do the same for pdfs (Corel is not default app for them)

        • Does it matter what program displays your PDF ?

          Foxit reader usually opens additional documents in tabs of a single instance, so might do what you need.

          • We get a lot of artwork sent in pdf format and the artworkers like to have them open by default in acrobat standard as sometimes they have to convert it to an eps from there if corel decides it doesn't like the file.

        • I'm trying to do some Autohotkey automation. Has anyone figured out how to open a file in Corel without it opening another instance of Corel?