Jump to content

Search the Community

Showing results for tags 'applescript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Community Forums

  • The New Claris Platform
  • Community Resources
    • Community Videos, Tips, & Techniques, Articles.
    • FileMaker Marketplace Discussions
    • FileMaker Videos
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPad and iPhone
    • FileMaker and the Internet
    • FileMaker Pro 19
  • FileMaker Server Administration
    • FileMaker Server 19
    • FileMaker Server 19 (Linux)
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
    • Zabbix Server Monitoring
    • Previous Version Server Discussions
  • JavaScript Integration
    • Java Script and the Web Viewer
    • Carafe.FM
    • Widget Studio
  • Brain Food
    • Security Concepts
    • The Left Brain
    • Upgrading & Migration
    • Data Analysis
    • Development Standards
    • The Separation Model
    • Relational Database Theory
    • Damaged / Corrupt File Problems
    • Hardware & Networking
    • Product Ideas
  • FMForums Affiliates & Sponsors
    • Productive Computing Support Forums
    • 360 Works Official Product Support Forums
    • Proof+Geist
    • FileMaker Vendors
    • FileMaker Training Resources
  • FileMaker Classifieds
    • Announcements of FileMaker Product, Services or Resources
    • Classifieds
    • Tools Of The Trade
  • FM Forums Operations
    • FM Forums Feedback & Site News
  • FileMaker Friday Night Chat's Topics

Blogs

  • Captain's Blog
  • FileMaker Weetbicks
  • FileMaker Security Blog
  • The FileMaker Rift
  • HOnza's Bits @ FMForums
  • SeedCode
  • 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
  • 1-more-blog
  • Productive Computing
  • Geist Interactive
  • Soliant Consulting

Categories

  • White Papers
  • Infographics
  • Samples
  • Add-ons
  • FMGo
  • Solutions
  • Tutorials
  • Plug-Ins

Product Groups

  • Workplace Innovation Platform
  • Site Advertising
  • Development
  • FileMaker Hosting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Title


Industry


Location


Interests


Website URL


Skype


MSN


Yahoo


OS Version

  1. Hello, I hope this is a simple question: Is there a reverse of the "Quote()" function, that would turn a calculated AppleScript in FM back to a straight AppleScript? I have a very complex calculated AppleScript that I need to retest. Thanks.
  2. Hello, I have a database that I run on 3 different computers, all with Mac OS 11.2. FMpro is 18.0.3.317. A script uses an AppleScript that opens a browser. The AppleScript invokes System Events and contains a "do shell script" step. On all computers, FMPro, Script Editor Script Menu are "allowed to control computer" in System Prefs. In the other 2 computes, with the Intel chips, the script runs flawlessly but it stumbles on the M1. M1 vs Intel is the only difference between there 3 setups. I know that v18 is not officially supported with Big Sur but the programs runs perfectly well. Any suggestions would be appreciated.
  3. Hello, the following is the essence of a problem I need to resolve. The code is AppleScript display dialog "Hello \"world\" " This code needs to run in FMP18 as a calculated applescript. I tried: Perform AppleScript [display dialog \"Hello "world" \"] Perform AppleScript [display dialog \"Hello \""world"\" \"] Perform AppleScript [display dialog \"Hello "\"world"\" \"] Perform AppleScript [display dialog \"Hello \""world\"" \"] and other permutations of 1 backslash and 2 quotation marks cause the calculation to be unsavable b/o error. Perform AppleScript [display dialog \"Hello \"world\" \"] results in "A identifier can’t go after this “"”." -- after the calculation is saved. (Yes, "A identifier") Perform AppleScript [display dialog \"Hello \"\"world\"\" \"] results in A “"” can’t go after this “"”. -- after the calculation is saved and an error message of -2740. Can anyone help me please?
  4. We are working on a process for passing certain info nuggets out of a solution (FMP 13) in an encrypted method. For various reasons a version upgrade isn't feasible. So the plan is to encrypt the nuggets, then pass them into a format for transport. Currently, we're using Applescript to pass the particular fields into an AES-256-CBC encryption process in a calculated Applescript step, as follows : The problems which concern me here: 1. The password is "traveling" into Terminal in plaintext. Is there a way this can be viewed during the process (a 'ps' or some other method)?? 2. Is there a better method to accomplish this without running as an echo? I've tried various flavors of this process (successful encryption & transport, etc), but am most concerned about the potential vulnerability from within OSX.. I've run various flavors, then attempted to grep for any of the password strings in log files and Library/Application Support/ folders, but haven't found anything... Is this an unfounded issue, or should I be going a different direction?
  5. I just upgraded to FMP16 from FMP13. My applescripts no longer work. I get an error of -10004, for which I cannot find an explanation. Any idea what I must change to make Applescripts work in FMP16?
  6. I am trying to create a button that deploys a script that opens a corresponding server folder based on the value in a particular field of the current record card. Here is what I have so far, but I can't figure out why it is not working: Set Variable [ $jobno ; Value: Project File Server Locations::_4_digit_Job_No. ] If [ $jobno ≤ "100" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0001 - 0100" of disk "TRG Projects" end tell" ] Else If [ "100" < $jobno ≤ "200" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0101 - 0200" of disk "TRG Projects" end tell" ] Else If [ "200" < $jobno ≤ "300" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0201 - 0200" of disk "TRG Projects" end tell" ] Else If [ "300" < $jobno ≤ "400" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0301 - 0400" of disk "TRG Projects" end tell" ] Else If [ "400" < $jobno ≤ "500" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0401 - 0500" of disk "TRG Projects" end tell" ] Else If [ "500" < $jobno ≤ "600" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0501 - 0600" of disk "TRG Projects" end tell" ] Else If [ "600" < $jobno ≤ "700" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0601 - 0700" of disk "TRG Projects" end tell" ] Else If [ "700" < $jobno ≤ "800" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0701 - 0800" of disk "TRG Projects" end tell" ] Else If [ "800" < $jobno ≤ "900" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0801 - 0900" of disk "TRG Projects" end tell" ] Else If [ "900" < $jobno ≤ "1000" ] Perform AppleScript [ "tell application "Finder" activate make new Finder window set target of Finder window 1 to folder "Projects 0901 - 1000" of disk "TRG Projects" end tell" ] End If
  7. 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.
  8. 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
  9. 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?
  10. 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
  11. 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?
  12. 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://2.236.100.143/dati" ... 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
  13. 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: https://beezwax.net/products/bbox.
  14. 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!
  15. 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!
  16. 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(?)....
  17. 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
  18. 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
  19. 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?
  20. 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!
  21. 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.
  22. 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
  23. 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
  24. 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 "<272806308.1242704601.438674@google.com>" 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" = "<272806308.1242704601.438674@google.com>" I found a topic here on this forum with a similar error (http://fmforums.com/forum/topic/93624-applescript-grabbing-value-from-related-table/). 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
  25. 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.
×
×
  • Create New...

Important Information

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