7 Replies Latest reply on Apr 18, 2006 5:53 AM by JP Heidi

    Strange Happenings

    JP Heidi Level 1
      Now that the rush/crunch/panic is over, I find this very strange and wondered if anyone else had this problem and/or found a solution or a reason.

      I always test drive my director presentations on my desk top before cutting to CD.

      Using Director MX I have been opening .pps files using the PowerPoint viewer included on my CDs for some time now with great results. Yesterday I had a rush job where it was simply two buttons one opening one .pps file and the other button opening another .pps file. Simple, right?

      Like always, I copied my code from an existing presentation, created my projector and copied my .exe file and my Source folder to my desktop. The Source folder has my .pps files and all the files needed to run PowerPoint Viewer. I ran my program and every time I clicked one or the other buttons I got 3 errors:

      PowerPoint Viewer Cannot find the file "Documents"

      PowerPoint Viewer Cannot find the file "and"

      PowerPoint Viewer cannot find the file "MyFile.pps"


      My code:


      on mouseUp me
      cursor -1
      open the pathName & "Source\MyFile.pps" with "Source\PPTVIEW.EXE" , "normal"
      go to "Wait"
      end

      After 2 hours of hair-pulling (and some pretty lucky deductions) I discovered that when I copied my .exe file and Source folder to a CD, the presentation works with no errors. Even old presentations that I have tested & distributed are now no longer working on my desktop but only off a CD. (I have tested this on other computers with the same results)

      Some of my projectors are much more extensive, running large videos, opening .pdfs, etc. so I usually tell the end-user (mostly for trade-show kiosks) to copy the files to their desktop making it run smoother than off the CD.

      But if the PowerPoint Viewer doesn't work off the desk top . . .

      Any help would be appreciated.

      Thanks.
        • 1. Re: Strange Happenings
          Level 7
          On Fri, 14 Apr 2006 18:24:12 GMT, JP Heidi posted in
          macromedia.director.basics:

          > PowerPoint Viewer Cannot find the file "Documents"
          >
          > PowerPoint Viewer Cannot find the file "and"
          >
          > PowerPoint Viewer cannot find the file "MyFile.pps"

          Microsoft applications do not like spaces in file path/names passed via the
          command line (which is essentially what Lingo's 'open' command does).

          You /may/ be able to enclose the path/name in quotes and use 'open', but I
          recommend using Buddy API with it baShortFileName() and baRunProgram() ro
          baShell() methods.

          I don't recall whether the free FileXtra4 Xtra has a shortFileName feature,
          but it might be worth checking out.



          --
          Mark A. Boyd
          Keep-On-Learnin'
          • 2. Re: Strange Happenings
            JP Heidi Level 1
            Where were you yesterday before I went bald????? (actually you probably would have been here had I asked, huh?)

            Thanks for the reply. Real quick I just tried:

            OK = baOpenFile( the pathName & "Source\MyFile.pps" , "normal" )

            and it works.

            It seems that this would open the viewer on my PC instead of the CD (in case someone does'nt have PowerPoint installed)

            I'll look into the baShortFileName() (what's the difference between this and baOpenFile?) and baRunProgram() (Run PPT Viewer from the CD?) robaShell() functions.

            Thanks for your help!
            • 3. Re: Strange Happenings
              JP Heidi Level 1
              Oh, and it still doesn't explain why Director's "Open" doesn't work all of a sudden . . . new version of PowerPoint, perhaps?
              • 4. Re: Strange Happenings
                Level 7
                On Fri, 14 Apr 2006 20:05:08 GMT, JP Heidi posted in
                macromedia.director.basics:

                > OK = baOpenFile( the pathName & "Source\MyFile.pps" , "normal" )
                > and it works.
                >
                > It seems that this would open the viewer on my PC instead of the CD (in
                > case someone does'nt have PowerPoint installed)

                Yes...sort of. It will open the file with whatever program is associated
                with the .pps extension - if any. That could be an installed version of
                PowerPoint Viewer, the full PowerPoint, Open Office, etc...

                > I'll look into the baShortFileName() (what's the difference between
                > this and baOpenFile?) and baRunProgram() (Run PPT Viewer from the CD?)
                > robaShell() functions.

                They're all listed in the Buddy API help file (I meant to type
                "...or baShell()" not "...ro baShell()").

                Something like this should help illustrate. You might want to include some
                baFileExist() functions, etc...

                ppViewer = the moviePath &"Source\ppView32.exe"
                ppViewer = baShortFileName(ppViewer)
                theFile = the moviePath &"Source\MyFile.pps"
                theFile = baShortFileName(theFile)
                OK = baRunProgram(ppViewer &&theFile, "normal", 0)
                if OK < 32 then
                -- something went wrong
                -- see Buddy Help for return codes
                -- alert the user?
                end if

                baShell() does offer the addition of the WorkDir argument. You may or may
                not find that useful for ppt viewer. If there are any externally linked
                assets (actions) in the PPS file, the WorkDir might be needed.

                Note that 'the pathName' is deprecated and 'the moviePath' is the
                recommended replacement - or whatever the equivalent is in MX2004's object
                model syntax.


                --
                Mark A. Boyd
                Keep-On-Learnin'
                • 5. Re: Strange Happenings
                  Level 7
                  On Fri, 14 Apr 2006 20:09:03 GMT, JP Heidi posted in
                  macromedia.director.basics:

                  > Oh, and it still doesn't explain why Director's "Open" doesn't work all
                  > of a sudden . . . new version of PowerPoint, perhaps?

                  Just guessing, but have you tried it from a projector running in
                  "C:\Documents and Settings\JP Heidi\Desktop\whatever\" before?

                  Lingo's 'open' and Microsoft apps have behaved this way as far back as I can
                  remember. In Director terms, that goes back to Dir 4.0 some time in the 90's.

                  Some programs will accept QUOTE &"path\to\file.ext" &QUOTE, but I don't think
                  MS apps ever have.


                  --
                  Mark A. Boyd
                  Keep-On-Learnin'
                  • 6. Re: Strange Happenings
                    swasher1
                    The answer is quite simple. Everyone is making it too complicated. Your files need to be at the root level of the drive when going to the powerpoint files. The reason it works on the CD is that your CD is the root level. Works everytime.
                    good luck.
                    • 7. Re: Strange Happenings
                      JP Heidi Level 1
                      > Just guessing, but have you tried it from a projector running in
                      > "C:\Documents and Settings\JP Heidi\Desktop\whatever\" before?

                      I always test my projectors on my desktop (I cannot run .exe files from my document server). Of course, it's been about 6 months since I did a project like this, so it is very possible that my tired old brain is just getting the best of me.

                      Swasher1 -- Yes, that is a simple answer and it does work. It is just easier to tell people to copy the files to the desktop rather than try to explain to them what the "C" drive is (I work with some very intelligent engineers ; ) . . . not only that, but people are sometime hesitant to put "strange" files on their hard drive.

                      Anyway, Buddy seems to be the answer . . . thanks for all your help!!