Windows Users May Snarl
Posted on August 12, 2008 by Michael Gaslowitz
If you liked the post where I integrated Growl into FileMaker, but wondered if it could work on Windows, you might want to take a look at Snarl.
Like Growl on Mac OS X, Snarl displays on-screen notifications in Windows, and with the help of the command-line utility Snarl_CMD.exe, Snarl can be integrated to work with your FileMaker solutions as a custom function.
Below is an outline of what I would do if I was using Windows. I apologize for not including a sample file this time, but I do not have access to a Windows machine, and I do not want to post a file that does not work.
The Custom Function
Since Snarl_CMD.exe accepts parameters as follows:
Snarl_CMD.exe snShowMessage TIME TITLE BODY [iconPATH]
/*
TIME is the time the message should be displayed in seconds
(0 means forever/sticky),
TITLE and BODY are the texts which should be displayed, and
iconPath is the windows path for an icon to be displayed in
the notifcation:
"C:\my\path\img.png" or "\\server\path\on\server\img.png"
*/
the Snarl custom function will look something like this:
Snarl ( Time; Title; Body; Path ) "Snarl_CMD.exe snShowMessage" & Quote ( Time ) & Quote ( Title ) & Quote ( Body ) & Quote ( Path )
The External Function
The Snarl custom function gets passed into the built-in FileMaker function Set Variable, but since Snarl_CMD.exe is a shell script, it requires a plugin to be executed. ScriptMaster from 360Works is a free one, and it can do a whole lot more than execute shell scripts.
To configure ScriptMaster, set a variable in your startup script with the following value:
RegisterGroovy( "RunShellScript( shellScript )" ; "Process process = Runtime.getRuntime().exec( shellScript );¶ String processResult = process.getInputStream().getText();¶ process.waitFor();¶ exitValue = process.exitValue();¶ return processResult;" )
You have now created an external function for this solution:
RunShellScript ( shellScript )
The Script
Now it is time to put everything together in a Set Variable script step:
Set Variable [ RunShellScript( Snarl ( "Time" ; "Title" ; "Body" ; "Icon Path" ) ) ]
Hopefully it works. Leave a comment and let me know!
» Filed Under: Custom Function, FileMaker, Plugin, Scripting | 3 Comments
Video: Happy Birthday Mom
Posted on August 10, 2008 by Michael Gaslowitz
iPod Download (2.6 MB)
» Filed Under: Mom, Podcast | 1 Comment
Video: Import Data from the Fake Name Generator
Posted on August 8, 2008 by Michael Gaslowitz
This post demonstrates how to use the Fake Name Generator to generate fake data for your real FileMaker databases. Beginners will also learn how to import Microsoft Excel spreadsheets into FileMaker.
iPod Download (8.2 MB)
Download FakeNameGenerator.zip
» Filed Under: FileMaker, Podcast, Toolkit | Leave a Comment
Video: Quicksilver for Large Type Functionality
Posted on July 30, 2008 by Michael Gaslowitz
This post demonstrates how to integrate Large Type functionality into your FileMaker Pro database using Quicksilver. For those who have never poked around in Apple’s Address Book, clicking on a phone number type (work, home, etc.) pulls up a list of options, one of which is Large Type. Think big numbers across the screen for easy viewing and dialing.
Quicksilver’s Large Type functionality is accessed via an AppleScript that has been embedded in a custom function. Filemaker Pro Advanced is required to view the custom function.
iPod Download (11.5 MB)
» Filed Under: AppleScript, Custom Function, FileMaker, Podcast | Leave a Comment
FileMaker DevCon 2008 Recap
Posted on July 20, 2008 by Michael Gaslowitz
I want to use this post to share with you a few of the amazing presenters and sessions I attended at FileMaker DevCon 2008 in Phoenix, AZ. Please note that while I did attend 12 sessions, I am only listing the ones that really opened my eyes. I learned so much over the course of three days that I am excited beyond words, and I have not been able to stop talking about the great things that are going to happen with FileMaker. I know I am not the only one.
Monday, July 14, 2008
-
Craig Saunders, CEO of Digital Fusion Ltd, presented How to Design Super Cool User Interfaces Using the Web Viewer, and the power of their Fusion Reactor plugin blew us away. Simply, this plugin allows you to communicate with your database through FileMaker’s web viewer. You can embed and run FileMaker scripts, filter portals, and create sliders, buttons, and pop-up fields that grab data from FileMaker fields and value lists. Some web voodoo might be required (HTML, CSS, Javascript), but there are several built-in functions (like buttons and sliders) that are dead simple to use. Licensing is very affordable, especially if you are going to bundle it into a commercial solution. Check out the demo today.
-
Steve Lane, vice president of Soliant Consulting, presented Basics of Software Development Lifecycles, and for a developer just starting out on his own, this was an invaluable session to me. He touched on the five basic parts of software development: (1) requirements, (2) design, (3) development, (4) testing, and (5) deployment, and the different ways and combinations these could be applied: namely staged, spiral, and agile. A simple project with few requirements and a straight-forward design might be done quickly through a staged development approach, whereas if you are trying to build complicated workflows into your solution, where plenty of user testing is needed, more of an agile approach might be required.
If you are dealing with clients who neither wish to provide requirements upfront, or view intermediary progress, it was recommended to explain to the client that they just might not be ready for this database, or that it would be beneficial to have access to someone in the organization who can commit time to this project. For reconstructing a damaged database with functional enhancements and architectural redesigns, hope your client trusts you because depending on the complexity of the solution, it is going to take a long time.
Steve also recommended two books for your enjoyment: Software Estimation: Demystifying the Black Art (Best Practices (Microsoft)) by Steve McConnal, and Agile Estimating and Planning (Robert C. Martin Series) by Mike Cohn.
Tuesday, July 15, 2008
-
Christopher Gauthier, senior applications developer at Greenpages Inc., presented Document Management Integration Using Microsoft SharePoint and the Google Mini. The demo with SharePoint was interesting. It allows your organization to share just about anything across groups like Apple’s Wiki Server, and even for those who are technologically adverse, configuration and usability seemed fairly straightforward. Still, SharePoint is expensive, hard to customize on the back-end, and of course, Windows only.
The Google Mini on the other is an amazing piece of hardware, and it is just like having Google for your very own use. Starting at $3,000 for 50,000 documents (up to $10,000 for 300,000 documents), it will index almost anything you throw at it: internal/external websites, local file servers, and thanks to the FileMaker API for PHP, your databases too. All you need to do is put your contacts/projects/documents/etc. table into PHP so it is web-accessible, have the Google Mini crawl and index the page, setup the search interface of the Google Mini in a web viewer, then use the Reactor plugin to access your results. For larger collections there is the Google Search Appliance which starts at $40,000, and can index up to 30,000,000 documents. I may never need to create a search script or layout in FileMaker again.
-
Todd Geist, founder of geist interactive, presented Extend FileMaker Pro Web Viewer Functionality, and the file he posted on his blog is going to make working with the web viewer a whole lot easier. Todd went and wrote a bunch of really ingenious custom functions, and when combined with the mbs plugin, all we need to do is write in a slightly stylized form of html, and his work will embed javascript libraries and escape out, or put in, all the necessary quotation marks for the web viewer to render properly. What are you going to do with all of the development time you saved?
-
Lance Hallberg, owner of FM Synergy, presented FileMaker API for PHP Advanced Techniques. Did you know you can execute PHP scripts from the Import Records script step? Nothing gets imported, and as long as you catch for errors it will not yell at you. You can also run PHP scripts from the command line, and schedule these scripts to run from FileMaker Server. Be sure to check out Lance’s Javascript class LAJAX Class, especially if you are interested in calling external web pages and returning the results into Javascript functions.
Wednesday, July 16, 2008
-
Todd Geist, founder of geist interactive, returned and presented a session and a workshop back-to-back on Database Transactions. Think of a transaction as a single interaction with a database. Opening a record, making an edit, and closing the record is a transaction. Cycling through a portal and updating fields in each related record is also a transaction. The important thing to remember is that the whole transaction must be completed without any errors, and if there is an error at some point, everything completed prior to the error should be undone. If you are looping through 10,000 (accounts receivable) records, you need to know if there was an error with one of the records because you cannot have some data that is right and some data that is wrong. Through a combination of manually saving layout data with the Commit Records script step, and some thought out script design with and without error capturing, reliable and accurate data can be achieved. 3/3 on Todd’s presentations FTW.
Thanks again to everyone for a fantastic conference. See you all next year.
» Filed Under: Devcon, FileMaker | Leave a Comment
Video: Growl Integration
Posted on July 11, 2008 by Michael Gaslowitz
This post demonstrates how to integrate the Growl notification system for Mac OS X with your FileMaker Pro Database. Growl notifications are called via an AppleScript that has been formatted into a custom function. FileMaker Pro Advanced is required to view the custom function. These notifications can be used whenever you want to alert a user without requiring his or her interaction.
iPod Download (18.5 MB)
» Filed Under: AppleScript, Custom Function, FileMaker, Podcast, Scripting | 2 Comments
Video: Paged Data with Resizable Portals
Posted on July 2, 2008 by Michael Gaslowitz
This post demonstrates how to create Google-style page results in dynamically-sized FileMaker portals. As you will see, all it takes is a few local variables, a layout object with conditional formatting, and the zippScript plugin for it to work. The sample file can be found below the video*.
One thing I did not mention in the video (but you will soon see) is how fast this solution works. As you are watching, keep in mind that this was recorded on an iBook G4. The solution practically pages itself on newer hardware. \o/
iPod download (15.6 MB)
» Filed Under: FileMaker, Plugin, Podcast, Portal, Scripting | 3 Comments
zippScript for Script Triggering and Scheduling
Posted on June 5, 2008 by Michael Gaslowitz
If you are not using script triggers in your solutions (or have no idea what I am talking about), go download the amazing zippScript plug-in and install it right now. From the zippTools website:
Simply add a zippScript trigger in a calculation dialog to:
- Perform a script when a field is modified
- Perform a script when a record is committed
- Perform a script when a field is displayed
- Perform a script when the mouse is over a field (FM8 and later)
- Call a script with a calculated name
- Schedule a script to be performed at a specific date and time
The zippScript trigger (external function) you will find yourself using the most looks like:
zippScript_PerformScript( FileName; ScriptName {; Param; Control} )
If you have never used an external function before, you find it when defining a calculation:
Take your time with the sample file that zippScript’s developer, John Kornhaus, supplies, and be ready to use your new-found knowledge in a future post.
» Filed Under: FileMaker, Plugin | Leave a Comment
Function Scripting [ learn ]
Posted on May 29, 2008 by Michael Gaslowitz
The method I use to pass and retrieve parameters in almost all of my scripts is something I learned from Matt Petrowsky’s instructional video at FileMaker Magazine called Function Scripting. It is not for beginners, but it is one of the more powerful and dynamic things you can learn to do with FileMaker.
Function Scripting requires three custom functions to do the heavy lifting; one by Alexander Zueiv, and two by Mikhail Edoshin.
A copy of FileMaker Pro Advance will be needed to view the custom functions. If you do not have a copy of FileMaker Pro Advanced, you will still be able to use the sample file.
Name your scripts [ like; this ]
To use this method you need to format the names of your scripts with the parameters the script will use:
Example Script [ expected; (this|or|that) {; optional } ]
Notice how it looks like a function? This is why it is called Function Scripting! How about some real-world examples:
Dialog [ title ; message ] // A script that takes two parameters: title and message Create [ name ; user|admin ] // A script that uses an "or" Record [ ID ; add|delete ; action ] // A script that uses an "or" and optional third parameter
Spaces are not important, but the brackets, semicolons, and pipes are. Your scripts will not work if you omit them.
Supply parameters
When passing parameters into a script, format them using the custom function param.set[ ]:
param.set( "expected" ; "value1" ) & param.set( "this|or|that" ; "value2" ) & param.set( "optional" ; "value3" )
I have formatted the parameters for the dialog script. Try to do the other two scripts yourself, or consult the sample file:
param.set( "title" ; "Alert") & param.set( "message" ; "This is an alert!" )
Now the magic
The custom function param.assign[ ] does the rest of the work. Use it at the beginning of the script, and it will do two things:
- It will first check to see if you supplied and properly formatted all of the script’s parameters, and if you did,
- it will then assign each parameter to a $local variable to use throughout the script.
If [param.assign] //Do something here Else //Parameters not assigned End If
Our script:
Dialog [ title ; message ]
Receives parameters:
param.set ( "title" ; "Alert") & param.set ( "message" ; "This is an alert!" )
And performs the following steps:
If [ param.assign ] // We now have variables to use throughout the script: // $title = "Alert" // $message = "This is an alert." Show Custom Dialog [ $title; $message ] Else // Missing or improperly formatted parameters Show Custom Dialog [ "Missing Parameters"; "Parameters not assigned."] End If
Download the sample file
I have included examples in the the sample file that you how to use the (this|or|that) parameter, and how to pass retrieve multiple parameters using the param.get( ) custom function.
» Filed Under: Custom Function, FileMaker, Scripting | Leave a Comment
Configure AppleScript to Work with FileMaker
Posted on May 20, 2008 by Michael Gaslowitz
Before we get into all of the cool things you can do with FileMaker, we need to make sure it is configured to work properly with Apple’s scripting utility, AppleScript.
Head into the Finder, navigate to Applications > AppleScript, and open up AppleScript Utility.
Check the box Enable GUI Scripting.
You are now ready for filemaking with AppleScript.
» Filed Under: AppleScript, FileMaker | Leave a Comment




































