Photography Workflows – Filemaker and Applescript – 3

Photography workflows will cover basic Filemaker database and Applescript implementation.

Firstly make sure you have these

download photo_database

download script

and you have read these

Workflow-1

Workflow-2

The Filemaker database is a simple relational database. The purpose here though is to show you just how powerful a simple database can be and central to your workflow.

The database contains info about the client, their images and where they are stored on your LAN. Because you have that info you now can use it to your advantage.

But first lets have little Applescript lesson.

Open HardDrive>Applications>Utilities>Script Editor and write

display dialog “Hallo World”

hit cmd-k to compile and cmd-r to run the script.

you see the dialog box has 2 buttons. We can change them. Write..

display dialog “Hallo World” buttons {“Ta Dah”, “No Thanks”}

Wanna do something with the result then write…….

display dialog “Hallo World” buttons {“Ta Dah”, “No Thanks”}

set someWheretoStoreTheResult to button returned of result

The button pressed is stored in the someWheretoStoreTheResult variable. We can then use the result of this dialog. Write…

display dialog “Hallo World” buttons {“Ta Dah”, “No Thanks”}

set someWheretoStoreTheResult to button returned of result

if someWheretoStoreTheResult is equal to “Ta Dah” then

display dialog “Nice to see you”

end if

if someWheretoStoreTheResult is equal to “No Thanks” then

display dialog “Bye bye world”

end if

This is scripting/programming. Create a scenario, then act upon that scenario. I’m not asking you to script but just look at this example and you can follow the actions in the downloaded script. All this does is give a sprinkling of stardust in your grey matter in the way computers do stuff. Armed with that ‘knowledge’ you might just think of doing stuff on your computer in a different way.

Even us photographers should understand the logic of this.

Lets use this info with the database.

Open database and make sure you have a created a client like in this blog

In Script Editor go to File>New and paste this

property dbase : “photo_database”

property mylayout : “form”

property imagelayout : “image_names”

–tell the database stuff

tell application “FileMaker Pro Advanced”

go to database dbase

go to layout mylayout

set curRec to current record

do script “commit”

–get data

set {thedate, fname, lname, email, mobile, uniqueID, thepath, twit, face, imageList, imagePath} to curRec

end tell

activate

display dialog (fname & “” & lname & return & email & return & mobile as string)

So we have extracted info from the database.

set {thedate, fname, lname, email, mobile, uniqueID, thepath, twit, face, imageList, imagePath} to curRec

This is a list {any, thing, in, these, brackets, is, a list, (or a record!! dont go there)}

Each of these ‘theDate, fname’ is a variable holding info like someWheretoStoreTheResult variable earlier.

All we have done is display a dialog..What if we could send an email with attachments or twitter something with an image, And do this through an automated workflow!

2 Comments

  1. […] get to know Filemaker a little better use download the database in the previous post. Your excel data might include more fields than is in photo_database so you will need to add some […]

  2. […] Photography Workflows – Filemaker and Applescript – 3 […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.