1 Reply Latest reply on Jan 15, 2009 7:56 AM by clbeech

    Executing VBS Within Flash

      Hello there,

      To start of with I am using the following:
      Flash Professional 8 w/
      ActionScript 2.0

      Using the fscommand, I am trying to fire off or execute VBS within flash. I want to use a button to do this. The following is my AS code for said button:

      on (release) {
      fscommand ("exec”, "Copy dataset1 to desktop.vbs");

      I have placed all of my files within the following "fscommand" folder:
      1. The Copy to dataset1 to desktop.vbs file
      2. The dataset 1.txt
      3. My .fla file
      4. My .exe file

      I believe the "Copy to dataset1 to desktop.vbs" app. that my co-worker wrote is correct, because when I click on it (from out side of Flash it does what it’s supposed to do.

      And it’s still not working. Any help will be greatly appreciated!
        • 1. Re: Executing VBS Within Flash
          clbeech Level 3
          interesting, I've never attempted anything quite like this (.exe and VB), however in reading the docs on it, if I'm interpreting this right (probably not lol) it seems as though the .exe file should be 'outside' the fscommand directory, and not within it. also the .fla file should not be needed within the directory as well. additionally, I'm not certain that the app name should contain 'spaces' as the docs do specify the only acceptable characters. here's the main docs quote I'm referring to:

          "The exec command can contain only the characters A-Z, a-z, 0-9, period (.), and underscore (_). The exec command runs in the subdirectory fscommand only. In other words, if you use the exec command to call an application, the application must reside in a subdirectory named fscommand. The exec command works only from within a Flash projector file."