AnsweredAssumed Answered

Cross platform script

Question asked by willrollo on Jun 16, 2013
Latest reply on Jun 18, 2013 by willrollo

Title

Cross platform script

Post

     Hi

     I currently run a script on a mac system that creates a folder automatically on the desktop of a users computer. The folder's name is set by a field from the record that is being created - in this case, Name_short reversed (ie Smith, John)

     However, I plan on running FM12 on a mac server. I am not sure how to alter the script so that those connected to it can create this folder on the server as opposed to the user's own machine.

     The second question I have, is that if a PC is using this new script, then will it still work when creating this folder on the mac server?

     Thank you

      

         
  •           Set Error Capture [ On ]
  •      
  •           If [ Customers::Folder Created = "No" ]
  •      
  •           Perform AppleScript [ Native AppleScript: --tell application "FileMaker Pro Advanced" set folder_name to cell "Name_ShortReversed" of current record --end tell set DT to path to desktop tell application "Finder" try make new folder at "Macintosh HD:Users:williamrollo:Desktop:Enquiries:" with properties {name:folder_name} end try end tell ]
  •      
  •           If [ Get(LastError) ≠ 0 ]
  •      
  •           #Test PDF creation and save
  •      
  •           Show Custom Dialog [ Title: "Warning"; Message: "There was a problem creating the folder"; Default Button: “OK”, Commit: “Yes” ]
  •      
  •           Exit Script [ ]
  •      
  •           End If
  •      
  •           Set Field [ Customers::Folder Created; "Yes" ]
  •      
  •           Show Custom Dialog [ Title: "Information"; Message: "Folder Created"; Default Button: “OK”, Commit: “Yes” ]
  •      
  •           End If

Outcomes