I have a mirror upload established in Interarchy, and I need to activate it from within a FileMaker Pro script, presumably by using appleScript. It is likely that Interarchy would not be open when this happens. I’ve never used appleScript with Interarchy, and am having trouble understanding how to do this. Any ideas?
Okay, I’ll try again. The Interarchy dictionary gives this information for mirrorupload:
mirrorupload‚v : mirror a local folder to an FTP site, destroying all remote contents.
mirrorupload [alias] : Folder to mirror from
[host text] : ftp server (defaults to this mac)
[path text] : path to remote folder
[user text] : user name (defaults to “anonymous”)
[password text] : user password (defaults to your Email address)
[url text] : URL to remote folder
[sftp boolean] : use sftp
[protocol FTPProtocol/SFTPProtocol/FileProtocol/HTTPProtocol/HTTPSProtocol/WebDAVProtocol/WebDAVSProtocol/AmazonS3Protocol/AmazonS3SProtocol/SSHProtocol/SCPProtocol]
: protocol to use
[dryrun boolean] : execute mirror in dry run simulation mode
→ integer : Error code
Now, when I do a manual mirror upload Interarchy asks for the following for which I have given fake info to use for our purposes:
I just don’t understand how to write the script to do this. I tried a couple of things, but the script editor quickly told me I didn’t know what I was doing. Can someone help an old dog learn a new trick?
I tried something different and it appears to work.
I opened the Script Editor and selected the option to record a script. Then I activated Interarchy and clicked on the apple menu. Next I used the right arrow key to move to the Bookmarks drop-down menu, and then the down arrow key to move to the mirror bookmark I had created earlier to use manually. When I pressed the return/enter key the bookmark was activiated and did its thing. When it was finished, I pressed command-Q to quit Interarchy, and then stopped the recording of the script. After compiling the script, I ran it again and it works.
The resulting script looks something like this…
tell application "Interarchy"
activate
mirrorupload «data fss [long list of numbers and letters; likely hexidecimal code]» host "[url=ftp://ftp.thehost.com]ftp.thehost.com[/url]" path "/home/[...part left out...]/test_folder/" user "me" protocol FTPProtocol without dryrun
quit
end tell
Since I have no notion of what the apparent hexidecimal code means, I can only hope that this is okay to use. Comments are encouraged.