Jump to content
Server Maintenance This Week. ×

Path to Variable Folder


This topic is 3960 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

 

I have a script that maker a folder based on the product ID (always unique) and then generates several PDF certificates from a FM record.

 

I then have a script that I can choose the folder (choose folder/set result) to combine all the PDF files inside it into 1 file.

 

I'm looking to automate this process fully, by removing the user step of having to choose the folder.

 

I thought it would be a reality simple process of setting the  variable FolderName to the ProductID as I have for making the folder, but I'm getting -1727 errors, parameter is not an object specifier.

 

I feel that I'm quite close to a working solution, but I'm stumbling on something.

 

Any advice would be greatly appricatied.

 

Regards,

 

Skip

 

 

 

set workflow_path to "/Users/skipi/Desktop/CombinePDF.workflow"

 

tell application "FileMaker Pro Advanced"

set FolderName to cell "Product ID" of current record

end tell

 

 

set the theFolder to "Fusion:Users:skipi:Documents:TempCertsFolder:" & FolderName as alias

 

 

repeat with this_folder in the theFolder

 

-- get name and posix path of a folder

tell application "System Events"

set the folder_name to the name of this_folder

set the folder_path to POSIX path of this_folder

end tell

 

-- call automator workflow to process pdfs

do shell script "automator -D NewName=" & quoted form of folder_name & " -D FolderPath=" & quoted form of folder_path & " " & workflow_path

 

end repeat

Link to comment
Share on other sites

Sorted.
 
 
set workflow_path to "/Users/skipi/Desktop/CombinePDF.workflow"
 
tell application "FileMaker Pro Advanced"
set FolderName to cell "Product ID" of current record
end tell
 
set thefolder to  "Fusion:Users:skipi:Documents:TempCertsFolder:" & FolderName as alias
 
 
set the this_folder to thefolder
 
 
-- get name and posix path of a folder
tell application "System Events"
set the folder_name to the name of this_folder
set the folder_path to POSIX path of this_folder
end tell
 
-- call automator workflow to process pdfs
do shell script "automator -D NewName=" & quoted form of folder_name & " -D FolderPath=" & quoted form of folder_path & " " & workflow_path
Link to comment
Share on other sites

This topic is 3960 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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