1 Reply Latest reply on Dec 24, 2008 2:31 PM by (Dirk.Becker)

    VB ID3 How to run system command?

    Level 1
      I'm looking for help of some mighty VBS guru.
      I'd like to have my script run the following command:

      php D:\Desktop\01.php

      and return whatever it prints as a string.

      I realise this may seem little off topic in this forum, so here's
      the InDesign background:

      In mac version of my script I'm executing a shell command from javascript by 'app.doScript'
      this runs a line of AppleScript which executes the shell command. Then the outcome
      of it travels the same way to javascript and lets InDesign to process it.
      Something of this sort:


      shScript = "./ ~/Desktop/01.php";
      asScript = "do shell script \"" + shScript + "\"";
      myResult = app.doScript (asScript, 1095978087);


      It's probably not a clever way of running mySQL query and retrieving the results
      but I couldnt think of anything better.

      Now I need to do the same on Windows. This is rather difficult for me, because
      I know very little about VBS. All google searches on the subject led to some
      kind of Windows Scripting Host solution which doesn't seem to be supported by
      InDesign VBS interpreter.

      Can you help me please?