MBS FileMaker Plugin Example Databases
GraphicsMagick IPTC
All examples are included with download of MBS FileMaker Plugin.
GraphicsMagick IPTC.fmp12
File Options |
[Standard FileMaker Menus] |
When opening file |
12.0 |
Account Name; Account= Admin |
Off |
Off |
Off |
Off |
Script triggers |
Off |
Off |
Off |
Off |
Off |
Thumbnail Settings |
On; Temporary |
Tables
Fields
Table Name: IPTC - 3 Fields |
InputImage | Normal, Binary | Auto-Enter:
Validation:
Storage:
| |
|
|
|
|
Tag | Normal, Text | Auto-Enter:
Validation:
Storage:
- Repetitions: 1
- Indexing: None
- Automatically create indexes as needed
- Index Language: German
| |
|
|
|
|
Value | Normal, Text | Auto-Enter:
Validation:
Storage:
- Repetitions: 1
- Indexing: None
- Automatically create indexes as needed
- Index Language: German
| |
|
|
|
|
Layout Objects: IPTC
Regular Fields
|
- Top: 71 pt
- Left: 19 pt
- Bottom: 196 pt
- Right: 272 pt
| Field Format:
| Field Behavior:
- Allow field to be entered: In Find mode, In Browse mode
- Touch keyboard type: System Default
- Go to next field using: Tab key
| No |
|
- Top: 245 pt
- Left: 6 pt
- Bottom: 266 pt
- Right: 259 pt
| Field Format:
| Field Behavior:
- Allow field to be entered: In Find mode, In Browse mode
- Touch keyboard type: System Default
- Go to next field using: Tab key
| Yes |
|
- Top: 245 pt
- Left: 264 pt
- Bottom: 266 pt
- Right: 517 pt
| Field Format:
| Field Behavior:
- Allow field to be entered: In Find mode, In Browse mode
- Touch keyboard type: System Default
- Go to next field using: Tab key
| Yes |
Buttons
Button Properties | Coordinates | Script/Script Step |
|
- Top: 117 pt
- Left: 366 pt
- Bottom: 150 pt
- Right: 479 pt
| Perform Script [ “Run” ]
Scripts:
|
Script Hierarchy
Script Name | Run |
Off |
Yes |
|
|
Script Definition |
- #we query the metadata (IPTC) of a picture. The properties that we wants are in the list. We get the value for each property and store it in the database
- Delete All Records
[ No dialog ]
- Set Variable [ $tags; Value:"IPTC:2:5¶Image Name¶IPTC:2:7¶Edit Status¶IPTC:2:10¶Priority¶IPTC:2:15¶Category¶IPTC:2:20¶Supplemental Category¶IPTC:2:22¶Fixture Identifier¶IPTC:2:25¶Keyword¶IPTC:2:30¶Release Date¶IPTC:2:35¶Release Time¶IPTC:2:40¶Special Instructions¶IPTC:2:45¶Reference Service¶IPTC:2:47¶Reference Date¶IPTC:2:50¶Reference Number¶IPTC:2:55¶Created Date¶IPTC:2:60¶Created Time¶IPTC:2:65¶Originating Program¶IPTC:2:70¶Program Version¶IPTC:2:75¶Object Cycle¶IPTC:2:80¶Byline¶IPTC:2:85¶Byline Title¶IPTC:2:90¶City¶IPTC:2:95¶Province State¶IPTC:2:100¶Country Code¶IPTC:2:101¶Country¶IPTC:2:103¶Original Transmission Reference¶IPTC:2:105¶Headline¶IPTC:2:110¶Credit¶IPTC:2:115¶Source¶IPTC:2:116¶Copyright String¶IPTC:2:120¶Caption¶IPTC:2:121¶Local Caption¶IPTC:2:122¶Caption Writer¶IPTC:2:200¶Custom Field 1¶IPTC:2:201¶Custom Field 2¶IPTC:2:202¶Custom Field 3¶IPTC:2:203¶Custom Field 4¶IPTC:2:204¶Custom Field 5¶IPTC:2:205¶Custom Field 6¶IPTC:2:206¶Custom Field 7¶IPTC:2:207¶Custom Field 8¶IPTC:2:208¶Custom Field 9¶IPTC:2:209¶Custom Field 10¶IPTC:2:210¶Custom Field 11¶IPTC:2:211¶Custom Field 12¶IPTC:2:212¶Custom Field 13¶IPTC:2:213¶Custom Field 14¶IPTC:2:214¶Custom Field 15¶IPTC:2:215¶Custom Field 16¶IPTC:2:216¶Custom Field 17¶IPTC:2:217¶Custom Field 18¶IPTC:2:218¶Custom Field 19¶IPTC:2:219¶Custom Field 20" ]
- #load from container
- Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; IPTC::InputImage) ]
- #Determine number of loop passes
- Set Variable [ $count; Value:ValueCount ( $tags ) ]
- Set Variable [ $index; Value:1 ]
- Loop
- #get the tag and property name from the list
- Set Variable [ $tag; Value:GetValue ( $tags; $index ) ]
- Set Variable [ $name; Value:GetValue ( $tags; $index+1 ) ]
- #Get the value of the property
- Set Variable [ $value; Value:MBS("GMImage.GetAttribute"; $img; $tag; "UTF-8") ]
- If [ $value ≠ "" ]
- #Write the property and the value in a new record
- New Record/Request
- Set Field [ IPTC::Tag; $tag & " " & $name ]
- Set Field [ IPTC::Value; $value ]
- Commit Records/Requests
[ No dialog ]
- End If
- #add 2 because we used two values
- Set Variable [ $index; Value:$index + 2 ]
- Exit Loop If [ $index > $count ]
- End Loop
- # release environment
- Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
|
|
|
|
|
|
|
|
Script Name | Clear |
Off |
Yes |
|
|
Script Definition |
- #Clear the input
- Delete All Records
[ No dialog ]
- Set Field [ IPTC::InputImage; "" ]
|
|
|
|
|
|
|
|
Download example: GraphicsMagick IPTC
Used functions:
Links
MBS FileMaker Plugins