Search the Community

Showing results for tags 'applescript'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Custom Function Library


  • Journal

Community Forums

  • Community Resources
    • FileMaker Pro 15 Discussions
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Security Management
    • Security Concepts
    • Intellectual Property
  • FileMaker Server Administration
    • FileMaker Server 15
    • FileMaker Server 14
    • FileMaker Custom SSL Certificates
    • External Server Authentication
    • Stand by Server Deployment
    • Legacy FileMaker Server Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPhone & iPad
    • iBeacon Support
    • FileMaker IOS App SDK
    • FileMaker Discussions
    • Brain Food
  • FileMaker and the Internet
    • FileMaker Cloud
    • FileMaker WebDirect
    • Custom Web Publishing
    • Other Internet Technologies
  • Geist Interactive Product Support Forums
    • Visit Geist Interactive
    • Visit Modular FileMaker
    • FMPerception
    • Generator
    • fmQBO
  • 360 Works Official Product Support Forums
    • 360 Works General Support
    • MirrorSync by 360Works
    • SuperContainer by 360 Works
    • ScriptMaster by 360 Works
    • FTPeek by 360 Works
    • 360Works Email Plugin
    • DocuBin by 360 Works
    • Zulu – FileMaker, iCal & Google Calendar.
  • FM Forums Affiliate Sponsors
    • SyncServer Pro by LinearBlue
    • Open Source Frameworks
    • Monkey Bread Software (MBS Plugin)
    • FileMaker Plug-Ins
    • ISO FileMaker Magazine
    • User Group Central - Sponsored by
  • FM Starting Point - By Richard Carlton Consulting
    • Visit FM Starting Point
    • FM Starting Point - General Discussions
  • FileMaker Classifieds
    • FileMaker Product & Service Announcements
    • Professional FileMaker Training
    • Services for Hire
    • Services Wanted
    • Solutions Wanted
    • Tools Of The Trade
  • The Water Cooler
    • Member Lounge
    • Wants & Wishes
  • FM Forums Operations
    • FM Forums Feedback & Site News
    • Site Instructions


  • Captain's Blog
  • FileMaker Weetbicks
  • FileMaker Security Blog
  • The FileMaker Rift
  • HOnza's Bits @ FMForums
  • SeedCode
  • CampSoftware, Hal Gumbert
  • FileMaker Hacks
  • Skeleton Key's Blog
  • Wing Forward Solutions
  • 360Works Articles and Tutorials
  • GoBillit
  • Filemaker - an amateur's view
  • Linear Blue
  • Surya Kanta Mekap's Blog
  • eXcelisys' Blog
  • Manjit Behera
  • Blue Feather's Blog
  • RCC's FileMaker News and Bits
  • Thorsen Consulting
  • DB Services Blog
  • FileMaker Magazine
  • Eye on FileMaker
  • Dev Talk
  • The Philosophy of FileMaker


  • Samples
  • Solutions
  • White Papers
  • Plug-Ins
  • FMGo


  • FileMaker User Groups

Found 39 results

  1. 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
  2. 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?
  3. 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("") or chkUP("") --------------------------------------------------- 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
  4. 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?
  5. fmp 14 last release. i put this applescript in a global field and also all the fmp field are global. i don't understand wy it doesn't work, if the applescript var are set as ... "set ServerDisk to "afp://" ... it work. Were i am wrong? Many thanks. set ServerDisk to field ("ServerDisk_as" as text) of table ("__AS" as text) set ServerFolder to field ("ServerFolder_as" as text) of table ("__AS" as text) set VarAccount to field ("VarAccount" as text) of table ("__AS" as text) set VarPw to field ("VarPassWord" as text) of table ("__AS" as text) tell application "Finder" display dialog ServerFolder if not (disk ServerDisk exists) then mount volume ServerFolder as text as user name VarAccount with password VarPw end if end tell
  6. bBox is a FileMaker plug-in providing easy integration with shell, AppleScript, Python, and Ruby scripts. Freely available with a comprehensive demo file. This version adds the following: bBox_PythonEvaluate function for quick call-backs from FileMaker "no wait" mode for Bash, Curl, and sort functions function descriptions (FileMaker 15 only) now with over 160 examples in demo file Requires FileMaker 12 or higher and Mac OS 10.7 or higher. The majority of its 34 functions are server-side and CWP compatible. Details and download at:
  7. Hi All, I just thought I'd try to give back to the community that has given so much to me by writing a little tutorial. This technique is one I developed on Macs. Mac OS X has the curl command line tool as part of the default installation. Curl is like a web swiss army knife. You can fetch files, POST data, upload to or download from FTP servers etc... so it brings a lot of functionality to the table which isn't built into FileMaker. I make use of curl through the "do shell script" AppleScript command, which in FileMaker I use through the "Perform AppleScript" script step. Here's a simple 6 line script that lets you take the contents of a container field and upload it to an FTP site. Substitute your container field in the first and fifth lines and your FTP information in the $script variable to make it functional. This script could be extended by actually having variables for the FTP credentials/location too but I've kept it simple here just to demonstrate the technique. set variable [$file_name; GetAsText(YourTable::YourContainerField)] set variable [$path_temp; Get(TemporaryPath) & $file_name] set variable [$path_unix; Middle($path_temp ; Position($path_temp ; "/" ; 1 ; 2) ; Length($path_temp))] set variable [$script; "do shell script "curl -T " & $path_unix & " ftp://USERNAME:PASSWORD@FTP_HOST/FTP_DIRECTORY/" & $file_name &"""] Export Field Contents [YourTable::YourContainerField; "$path_temp"] Perform AppleScript [$script] Enjoy!
  8. Hi all, running into an issue with Quicklook on Yosemite. When we run this script: It causes Filemaker to open two instances of qlmanage, wait a while, then crash. I've heard there are difficulties getting Quicklook to behave in Filemaker on Yosemite, so I began exploring other options. I am aware of how to open a container file automatically using the computer's default settings for the file, but I was wondering if someone could help me understand how to open the contents of a container with Preview for OSX. Thanks for any insight you can give!
  9. Running on Mac OS, and need this script to move come files (.jpgs) out of a particular calculated folder/filename sequence. I've got this working in a separate applescript (to install said jpg files), but it's built slightly differently. The issue I'm getting is this: it errors out, and I get "Expected expression but found uknown token."... Not really sure what's causing this, but I suspect it's my escape marks that are not setup properly.... could any kind soul look at this and give me a little feedback? Here's the calculated AppleScript: "set myShCMD to \\\"mv /Volume/FOLDERNAME/FOLDERNAME/ \\\" & CALCULATEDFILENAME & " \".jpg /Volumes/FOLDER2/FOLDER2/\\\"" & ¶ & "myMountAFPVol()" & ¶ & "do shell script myShCMD" & ¶ & "myUmountAFPVol()" & ¶ & "on myMountAFPVol()" & ¶ & " tell application \"Finder\"" & ¶ & " mount volume \"afp://IPADDRESS/FOLDERNAME\" as user name \"LOGINID\" with password \"MYPASSWORD\"" & ¶ & " end tell" & ¶ & "end myMountAFPVol" & ¶ & "on myUmountAFPVol()" & ¶ & " tell application \"Finder\"" & ¶ & " eject \"MOUNT\"" & ¶ & " end tell" & ¶ & "end myUmountAFPVol" & ¶ BTW, this is running in Server 9.0v3, though i'm rather doubtful that matters(?)....
  10. I am trying to get FileMaker to extract the content of the inbox in mail. The code works on my computer but on my clients it has an issue. The code sets cell "g_Email_Inbox" and when I query that cell from applescript it returns its contents but within FileMaker on my client's machine NaDa. It displays as empty and any scripts within filemaker see the field as empty. I have attached the script for your use. Both new up to date machines. Client is running FM13 while I'm on 14. I will confirm that is not the issue but I suspect it is not. Really need so thoughts on this ... Im stumped Mail GetMessages.scpt
  11. I could really use some help! I'm in a crunch and need a solution fast. Any Applescript FileMaker gurus out there? My client sends me (usually weekly) batches of excel documents... hundreds of them. I've created import scripts and parsing scripts to get the data from the excel document into FileMaker, but I need a solid way of batching the import process. Below I'll explain what I currently have, but it's very clunky and errors out quite often, so I could really use some guidance. I can look at applescripts and for the most part understand what they are doing, but I'm no scripter. Basic need: Trigger import process in which one at a time, the excel documents are imported into my database and a few additional scripts are run internally. The excel documents come to me as .xlsm files, which FileMaker doesn't like. To overcome this, I change the name to .xls before importing. Here's what I currently have: An applescript app called "Auto-Import" I startup when I'm ready to import a batch. It looks at an IN folder. One by one, it moves the files to a WORKING folder, changes the name, then calls on FileMaker to do a script. FileMaker is set to look for a static file named "importme.xls" in the WORKING folder. It imports, then runs a couple of parsing scripts. After a short delay, the Applescript app changes the filename back to its original name, then moves it to the DONE folder, after which it moves to the next item in the list from the IN folder. I found this applescript somewhere and changed the paths and delay amounts until I got it to work...sort of. As you can imagine, I get lots of errors from FileMaker or Applescript trying to move on a do something before the other has finished. Boo. Seems like the better way would be to have applescript code within the FileMaker scripts, so everything is controlled by FileMaker. I'm open to any and all suggestions. Or if you know of something similar, point me to it. Please help! Jeff
  12. Is there a way in AppleScript, when communicating with FM (i.e., an AS triggered from outside of FM) to tell FM to freeze the window?
  13. Hi, I'm having problems with an applescript that tells Phone Amego to initiate a phone call. I've got it to work with a phone number hard coded into the script, but I can't get Filemaker to insert the field's content (phone number) into the script. Table name: PhoneAmego test Telephone number field (text): PhoneNumberGen Mac OSX Mountain Lion Filemaker 11 adv. The plain applescript is: tell application "Phone Amego" getURL "tel:555-555-xxxx" end tell I tried to write a calculated applescript: "tell application "Phone Amego"¶ getURL "tel: (PhoneAmego test::PhoneNumberGen) "¶ end tell" It will launch Phone Amego and display the screen pop, but it shows the number it's trying to dial as "PhoneAmego test::PhoneNumberGen". No call goes through. Thoughts? Thanks in advance!
  14. One thing I really like about FMP is that you can specify a "calculation" for a perform AppleScript script step. However, this does leave something to be desired. Before each quote in the AS, you have to do a backslash, and at the end of each line, the paragraph symbol. A problem I've had is that it's difficult to debug AppleScripts entered in FMP scripts. If the script is "static" -- i.e., you don't construct the script using various FM fields, etc. -- it's easy enough, because you can create the script in AppleScript editor, debug, and then copy and paste into FMP and enter the appropriate backslashes, etc. However, this doesn't work well if the script is "dynamic," where you're creating the script in a calculation field based on various FM fields. I have found a pretty good solution, however. First, create the script as a variable. Call it $script, for instance. So, the calculation field for the perform AppleScript would simply say $script. Now, insert a halt script command just prior to the perform AS command in your FM script And prior to that command, create a text file where the contents of the file are $script. I use the Troi File plug-in, but there may be another way to do that. At a minimum, with the Troi plug-in, you can open up the resulting text file in AppleScript editor, and execute it there. This is very beneficial, because the error handling is much better when executing an AS via the AS editor as opposed to directly through FM. Let me know if I'm explaining myself clearly, and/or if you have any questions. I will say that this saved me at least an hour of debug time today -- it's a worthwhile thing to do for complicated AS execution through FM.
  15. Here's the one I just finished up. For my legal practice, we routinely have to generate special PDF forms for submission to the patent office that list a lot of patents and related information regarding each. I wrote a script that: (1) takes the list from a field, and parses it to remove extraneous characters; (2) check whether each patent is indeed valid by querying Google; (3) for each valid patent, download related information from Google; (4) parsing the related information downloaded and generating an XML file; (5) causing Adobe Acrobat to import the XML file into the form. I had assist from some Troi plug-ins, primarily File, Dialog, and URL, and to a lesser extent Text. URL is used to query Google. File is used to create the XML. Dialog is used to present progress dialogs to the user, and to at the end give the user the option to open the created PDF form in Adobe, show it in Finder, etc. The script also relies to some extent on AppleScript. One caveat -- I did have to hire a guy on elance to add a custom menu item in Acrobat so I could automatically import the XML into the PDF, which is terrible in the functionality it reveals to AppleScript. In any case, if anyone is interested, I've attached a copy of the script to this post. I'm guessing that there are quite a few inefficiencies in how I do things -- I'm still quite novice -- and you may notice that I rely on AppleScript in some places where Troi File could have been used (simply because I had the AppleScripts already written). In a similar script, I download all the PDF files for the patents in lieu of generating the form. You can use the URL plug-in to download the PDF into a text variable, and then use File to save it with the extension ".pdf" such that it "becomes" a PDF. Generate IDS script.pdf
  16. Using FMP12, I was trying to use applescript to launch FMP and and a remote file.. I got it to work except for the fact that the "Open New or Existing File" dialog box pops up and stops the script.. The checkbox to disable the dialog is gone now (Please bring it back!!), so anyone know a way to use applescript to "Cancel" the dialog? Also, just for Reference sake, it took me awhile to get the applescript syntax correct to remotely launch a database file: This actually terminates the FM process the tries to open a remote database that on startup runs a script. set app_name to "FileMaker Pro" set the_pid to (do shell script "ps ax | grep " & (quoted form of app_name) & " | grep -v grep | awk '{print $1}'") if the_pid is not "" then do shell script ("kill -9 " & the_pid) delay 10 tell application "FMPro" activate delay 10 getURL "Fmp://username:password@ipaddress/filename.fmp12" end tell
  17. Hi, first post here. Got a problem with a very simple AppleScript that I'm very sure that was working once upon a time: tell application "FileMaker Pro Advanced" return every record of table "Mail" whose field "InternalMessageID" is "<>" end tell The error is: error "FileMaker Pro Advanced got an error: Event not handled." number -1728 from every record of table "Mail" whose field "InternalMessageID" = "<>" I found a topic here on this forum with a similar error ( But unfortunately, there was no solution posted. Does anyone have an idea what might cause this? The file is open and is in browse mode. Regards Beatrix Willius
  18. This took some good google-fu for me to figure out, so I figured I'd post just in case anyone else is having the same problem. I had the following snippet that worked perfectly for the local database: This failed when I migrated the database to a remote server. Instead, I use this. The field in question ("Client matter number") is the third field in the layout. This is why I specify two "" in the data. I don't know why the former doesn't work for remote databases, but such is life! - Mike.
  19. I've written the following applescript program to open my FileMaker Pro DBMS remotely. I get an AppleEvent time out error. Would someone know why? Thanks! tell application "FileMaker Pro" set openDBs to {} try set openDBs to name of every database end try if openDBs contains "dbms.fmp12" then show database "dbms.fmp12" else get remote URL "fmp12://batchuser@password/" end if end tell
  20. Hello, new here... I was hoping someone could help me with this simple application of AppleScript within FileMaker. I'm trying to grab the value of a field and have it as a variable in AppleScript set myVar to cell "Index #" This works fine. Index # is a field on current layout and while in Layout Mode its name displays exactly like this. But when I attempt to grab value of a field which in Layout Mode displays as ::Name then I get Object not found error. This field is still on the current layout but orignating from related table "Personal Data" How do I reference this related table and grab its field value?
  21. Hi All, I've been successful in creating an Applescript that creates events in iCal based on my fields in my 'shows 2' table in Filemaker. I was wondering if anybody knows how to add an alarm to the newly created event (ideally to notify the user the day before). Many thanks Here's the code in my Perform Applescript function (calculated): "tell application "Calendar" ¶ tell calendar "Test Cal" ¶ set eventDate to date " & Quote ( shows 2::typeDate ) & "¶ set eventDateEnd to date " & Quote ( shows 2::typeDateEnd ) & "¶ set newEvent to make new event at end with properties {description:" & Quote ( shows 2::icsDescription ) & ", summary:" & Quote ( shows 2::icsSummary ) & ", location:" & Quote ( shows 2::location ) & ", start date:eventDate, end date:eventDateEnd} ¶ end tell ¶ end tell"
  22. I successfully deployed SuperContainer (SC) via the Web Publishing Engine (WPE) of FileMaker Server 11 for years, on a Mac mini (2010) running OS 10.6.8 (Snow Leopard), with no problems. But I ran into the following problem with Mavericks and SC: I upgraded to more modern versions of OS X and FMS by doing a completely clean installation: Formatted the Mac mini's drive; Did a clean installation of OS X 10.9.1 (Mavericks); and Installed FileMaker Server 12v6 without problems. Next, I downloaded the latest SuperContainer from 360Works (v2.896). When I double-clicked the "Mac" (also known as "SCInstaller") to deploy SC with FMS, as I did before with FMS11, I was surprised to see this alert pop up: "'Mac installer' is damaged and can't be opened. You should move it to the Trash." Mac Installer is damaged.tiff I tried downloading a fresh copy, using Safari and Firefox; same error. I’d never seen this message before when installing any software, and I found no reports of it in this forum or in TechNet. The icon displayed in the alert window indicated that it was originating from Mac OS Gatekeeper. So the solution I tried was to change the "Security & Privacy" System Preference of Mavericks, under the "General" tab, to "Allow apps downloaded from Anywhere", rather than the more restrictive "Mac App Store and identified developers" option. (Perhaps another option would have been just to control-click the app icon and then select “Open”, to exempt the app from Gatekeeper; I didn't test that.) Apple’s support article on Gatekeeper mentions this “Damaged” app warning message is an indication that “the app has been altered by something other than the developer.” I doubt that any “true damage” is present in the Mac Installer for SC. I think the message appeared because AppleScript scripts get modified after they’re signed. An Apple support article on Mavericks security states: “Some apps and tools, such as AppleScript applications and some legacy tools, modify themselves after signing. These types of apps cannot be opened unless the Gatekeeper setting in Security & Privacy preferences is set to Anywhere” I had only tried the SC Installer on Mavericks, but I suppose the same error might have occurred on Mountain Lion or Lion, since Gatekeeper was introduced with Lion. It appears, for now, that we may need to temporarily disable Gatekeeper (by choosing the "Anywhere" option) in order for SC's Mac Installer to work. David M. Hollander, MD Combined Fields Consulting
  23. Hi all, Here's another little tutorial I figured I'd share. The last one I posted on this part of the forum was how to upload the contents of a container field to an FTP server, using AppleScript to use the cURL command-line tool. This is similar to that, in that it uses AppleScript to invoke cURL, but this script allows you to use cuRL similarly to wget, to specify an URL and a destination path and have filemaker download that file to that path. To use this function specify your URL and Download Path (ex: "/Users/yourusername/Desktop/") separated by ¶ in the script parameter. This will only work on Macs. It should work at the very least under MacOS 10.6-10.8 since I have confirmed that cURL comes packaged with the OS under those versions. -------------------------------------- curlDownload[$url, $unixpath] -------------------------------------- Set Variable [$url; Value:GetValue(Get(ScriptParameter) ; 1)] Set Variable [$url; Value:Substitute ( $url; "&" ; "" & "&" )] Set Variable [$url; Value:""" & Substitute ( $url; "&" ; "" & "&" ) & """] Set Variable [$unixpath; Value:GetValue(Get(ScriptParameter) ; 2)] Set Variable [$script; Value: "set curlscript to "curl "& $url & " > " & $unixpath & """ & "¶" & "set curlresult to do shell script curlscript"] Perform AppleScript [$script]
  24. I need to delete a file off of my Cincinnati Laser from FileMaker. It gets it there via a FMScript that export field contents of a container to this location. So I know the file name and the path its all built in a calculation field on that record. But I don't know how to get that info into an Applescript using the FM12 "Perform AppleScript" script step When I hard code the path and file name (Shown Below) it works. "set set xpath to "Titanium Brain:Users:smartin:Desktop:Laser:1512-clr-c.cnc"¶ tell application "Finder"¶ delete file xpath¶ end tell" When I try to pass the field contents (Shown Below) it doesn't work. "set xpath to Laser::gCNCPath¶ tell application "Finder"¶ delete file xpath¶ end tell" What am I missing?
  25. I need to Zip/Compress a local folder with 3 files so they can be attached to a scripted email sent by FileMaker. 360Works plugin is not available to me. I've figured out that I can set a FM script step to perform an AppleScript. I've seen that AppleScript can Compress folders/files. What I can't figure out is this: Where can I find step-by-step AppleScript instructions for zipping multiple files in a folder and can I just paste it into the Perform AppleScript script step? I've located instructions for single files but that doesn't help me. This is all so foreign to me I need the most basic explanations on how to do this. Files will be named differently but will always be in this folder - Macintosh HD:Users:Me:Documents:Company:FolderToBeZipped Thank you so much for any help.