8 Replies Latest reply on Mar 20, 2013 11:28 AM by NaturSalus

    Create a Folder on Desktop for a Mac from a PC

    NaturSalus

      Title

      Create a Folder on Desktop for a Mac from a PC

      Post

      From a project file created under Windows OS, is it possible to script the creation of a folder in the desktop of a Mac once it is run under Mac OSX?

        • 1. Re: Create a Folder on Desktop for a Mac from a PC
          philmodjunk

               How would a different computer, the PC, have access to a different computer's desktop--the Mac? (that seems an odd thing to do.)

               Or do you want to create the means with the database open on the PC and then be able to run the script while the database is open on the Mac in order to created that folder?

          • 2. Re: Create a Folder on Desktop for a Mac from a PC
            NaturSalus

            How would a different computer, the PC, have access to a different computer's desktop--the Mac? (that seems an odd thing to do.)

            FM is sold as a crossplatform (Windows OS / Mac OS X) software. By that I understand that if you develop a project file under Windows OS it will run under a Mac OS X and viceversa.

                 If it is so, think about what I am asking for:

            What is the script command and contents that I should create under Windows OS so that when the project file is run under Mac OSX it will create on the Mac folder the FM folder when the user triggers the Export script, for example.

                 Is this a questionable question?

                  

                  

                  

            • 3. Re: Create a Folder on Desktop for a Mac from a PC
              philmodjunk

                   Yes, that's why I asked this:

                   

                        Or do you want to create the means with the database open on the PC and then be able to run the script while the database is open on the Mac in order to created that folder?

                   The way your question was worded it sounded like you wanted to create a new folder on the desktop of Computer #1 (Mac) from FileMaker running on computer #2 (Windows). That would be strange to do for a folder on a computer's desktop.

                   Creating new folders from FileMaker requires performing a system script--and those are specific to the OS. Your first step is to create a working system script that creates this on the Mac. I suppose you could enter an Apple Script or other system script into a text field so that you can export the script as a text file and then perform it once you have the file open on the mac but I wouldn't try that. It makes more sense to create and test that file directly on a Mac so that you can confirm that the system you set up works.

                   You have to create the runtime on a Mac anyway, so you might as well create and test the system script while you are using the Mac to produce the mac version of your runtime solution.

              • 4. Re: Create a Folder on Desktop for a Mac from a PC
                NaturSalus

                 It makes more sense to create and test that file directly on a Mac so that you can confirm that the system you set up works.

                You have to create the runtime on a Mac anyway, so you might as well create and test the system script while you are using the Mac to produce the mac version of your runtime solution.

                     I understand that this is the best option, but in my world I don't have a Mac but I do have a customer willing to try it on his.

                      

                 I suppose you could enter an Apple Script or other system script into a text field so that you can export the script as a text file and then perform it once you have the file open on the mac but I wouldn't try that.

                I apprecaite your wise advice, but this is the only available option for me.

                I understand that I can create the applescript in a text field as a calculation, what I don't understand is how do I do to incoporate that into an Export script.

                Let me explain myself.

                My Export script  for Windows OS contains the following line for creating the FMExport folder in the desktop of a PC:

                     Sen Event ["aevt"; "odoc"; "cmd /c md FMExport/"]

                      

                     My Export script for Mac OS X must have a line for creating the  FMExport folder in the desktop of a Mac:

                     What I don't understand is how can I from the line of a script run the calculation inside a text file.

                      

                      

                      

                • 5. Re: Create a Folder on Desktop for a Mac from a PC
                  philmodjunk

                       I would think that the following approach would work for an AppleScript, but haven't tried it:

                       I've been able to create and execute batch files and VBScript files from FileMaker. I have a table where a text field (or a calculation field that returns text) contains a single line of code for that batch file or VBScript. I can then use a script to modify data in the text field(s) in that table and use Export Records to export the script from this table as a text file. I can select the option to automatically open this file and then the export records step both creates the text file and then executes it.

                  • 6. Re: Create a Folder on Desktop for a Mac from a PC
                    NaturSalus

                         Worth trying it.

                         Thanks

                          

                    • 8. Re: Create a Folder on Desktop for a Mac from a PC
                      NaturSalus

                           DavidAnders,

                           Thanks for the links.

                           I knew of Fenton example and feedback to other users questions. Unfortunatelly, all that valuable info is only useful if you are working on a Mac and have access to the Perfom AppleScript script step. Not my case.

                           Not beeing able to access Apple scripting from FM running under Windows OS, keeps bugging me because I don't quite buy  FMI marketing line:"FM is a platform software"

                            

                           And Marc McCall script example is built from a Mac. This proves, that FMI gives prevalence to Mac users.

                           Thanks