Jump to content
Sign in to follow this  
sflynn

Creating new folder via applescript

Recommended Posts

I need some applescript help. I know nothing of Applescript and it is really hard to find tutorials... I'm not looking in the right place.

Does anyone have an apple script that would take a value from my database and simply create a new folder?

In my record I have the file path in one field, and the name of the new folder in another field.

I want to execute an applescript to create a new folder at the end of that path. It is on a networked volume (not on workstation running databse). Gosh, any help you can give me would be so appreciated. Also, if you have any links to good training for applescript that'd be great too... I might have to go get applescript for dummies and actually read the book.... so 1980! :)

Thanks again for any help you can offer.

Steve.

Share this post


Link to post
Share on other sites

Steve,

Have you considered using ScriptMaster's Create Folder module?

Barbara

Share this post


Link to post
Share on other sites

See if this helps:

http://fmforums.com/forum/topic/79232-using-applescript-in-fm-pro-10-on-mac-os-x-to-create-a-folder

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By typewriter
      Is it possible to use AppleScript to open the Script Workplace, select a particular script and even scroll to a particular line?
      I looked through several AppleScript sources (there are not so many...) as well as the Dictionary of FIleMaker Pro Advanced 15, but all examples seem to deal with using the database (i.e. finding and manipulating records), not authoring.
      Why would be handy? I have an authoring database where I can store the scripts and scriptsteps of a solution. These are converted from FIlemaker XML using the MBS plugin, not that complicated. Then it's possible to select the scriptsteps that need attention. But locating these scripts in the original solution is quite time consuming, so an AppleScript would save me tons of time.
       
       
    • By ggt667
      Is there a way in AppleScript to trap if the connection is lost and have an AppleScript act on this?
      At the risk of asking and answering myself( AppleScript below )
      repeat tell application "FileMaker Pro" try database "db" on error do shell script "sudo shutdown -r now" with administrator privileges end try end tell delay 59 -- 59 secs end repeat  
    • By imdarek
      Hi, I am using filemaker 11 to copy customer info from excel into the database and then it would generate special keys in pdf allowing us to send the file to the customer.
      My access to the filemaker is non-admin, and the import function of customer info has been blocked.
      We are keying in the record one at a time, so we are looking at ways to automate this process.
      When I try to create a new record using applescript with just 
      it was not allowed. There are data that require validation like date and auto-indexed record number.
      So, is there a way we could create new record and then using the set function to copy data into the report?
    • By Franco Pagano
      When i use a local robot to create pdf files or other, i have a problem when the connection go down, filemaker loose every reference to the remote file.
      The only way is to close the file and open again, i solved this problem on Mac using this apple script.
      1)  The AS check the connection if ok open the file.
      2)  If the connection go down then the AS close the file and wait until the connection is up, at that time it reopen the file.
      3) if you close the file then the applescript quit it self. 
      I am not a Apple script developer, i assembled it using few examples, then probably  isn't well done but it work.
      -------------------------------------------------
      tell application "Finder" to set ThePath to POSIX path of ((container of (path to me)) as alias)
      set VarRepeat to "Yes"
      tell application id "com.filemaker.client.advanced12"
          activate
          try
              set window_name to the name of every window whose visible is true
          on error
              set window_name to "Error"
          end try
      end tell
       
      ---------------------------------------------------
      repeat
          set testIP to chkUP("http://www.apple.com") or chkUP("http://www.google.com")
          ---------------------------------------------------
          if testIP as text = "False" and window_name contains "Robot" then
              tell application "System Events"
                  activate
                  set {procesList, pidList} to the {name, unix id} of (every process whose name contains "Filemaker Pro")
              end tell
              delay 5
              set VarLoop to "OK"
              try
                  --tell application "FileMaker Pro Advanced" to close every window
                  --on error
                  do shell script "kill -KILL " & pidList as text
                  set window_name to "Error"
                  set VarRepeat to "Yes"
              end try
              
              
          end if
          
          
          ---------------------------------------------------
          if testIP as text = "True" then
              try
                  tell application id "com.filemaker.client.advanced12"
                      activate
                      delay 5
                      set window_name to the name of every window whose visible is true
                  end tell
              on error
                  set window_name to "Error"
              end try
              --display dialog testIP as text
              --------------------------    
              if testIP as text = "True" and window_name contains "Error" and VarRepeat = "Yes" then
                  
                  tell application id "com.filemaker.client.advanced12"
                      activate
                      try
                          open ThePath & "Robot.fmp12"
                          set window_name to "Robot"
                          set VarRepeat to "No"
                      on error
                          quit
                      end try
                  end tell
                  
              end if
          end if
          ---------------------------------------------------    
          --with timeout of 60 * 60 * 24 seconds
          delay 5
          if VarRepeat = "No" and window_name contains "Error" then quit
      end repeat
      to chkUP(theURL)
          return (count (get ((theURL as URL)'s host & {dotted decimal form:""})'s dotted decimal form)) > 0
      end chkUP
    • By fm8443
      I have a simple Applescript that works in Script Editor
      tell application "Keyboard Maestro Engine" 
      do script "Search the Web" 
      end tell
      I add this same script (with escape chars) to my RESOURCES::A_SCRIPT field inside FM.
      The RESOURCES table is not connected to the other tables in the graph.
      "tell application \"Keyboard Maestro Engine\" 
      do script \"Search the Web\" 
      end tell"
      I've tried this with this field being defined as a Global Storage Field or not.  Similar problems with both.
      I have an FM Script called EXECUTE:
      Perform Applescript (RESOURCES::A_SCRIPT)
      When I run this FM Script I get an error message:
      "Error: -2741" / "Expected EOL but found Command Name"
      I've have tried rebooting my Mac.
      Any ideas?
       
       
×

Important Information

By using this site, you agree to our Terms of Use.