Author Topic: Applescript capabilities in PM5?  (Read 3075 times)

Offline danielmiller

  • Member
  • **
  • Posts: 53
    • View Profile
Applescript capabilities in PM5?
« on: September 12, 2012, 08:04:43 AM »
I'm hoping someone has experience in using Applescript to control Photo Mechanic 5. I'm trying to automate a part of my workflow and could use some help.

What I would like to do is automatically have PM5 ingest photos from a network volume once per day. I can make a cron job to launch an Applescript once per day but the problem is controlling PM5. I need to make sure that the settings in the Ingest dialog box are set specifically for this job and I'm not sure if and/or how to do it through Applescript. Is this even possible?

Offline Sven

  • Uber Member
  • ******
  • Posts: 1022
    • View Profile
Re: Applescript capabilities in PM5?
« Reply #1 on: September 12, 2012, 08:27:12 AM »
Hi Daniel!

You mean something like opening PM and getting the ingest dialog?
Code: [Select]
tell application "Photo Mechanic 5" to activate
tell application "System Events"
keystroke "g" using {command down}
end tell

You can reach everything that is available vie keyboard shortcuts. I do not have the knowledge of further Applescripting but this took me only a few seconds.

But I like the idea of automating things.

Sven
« Last Edit: September 12, 2012, 08:40:43 AM by SK-Foto »
Changed from behind the cam to one who buys images as I started to run. No cam or lens left.

Offline danielmiller

  • Member
  • **
  • Posts: 53
    • View Profile
Re: Applescript capabilities in PM5?
« Reply #2 on: September 12, 2012, 09:08:04 AM »
Hi Sven, thanks for the response.

Unfortunately, I need to do more than that. I have to have the script change some of the settings in the Ingest dialog box, such as the file renaming variables and the source. I don't know if that is scriptable and I can't find a resource or manual on PM scripting.

Offline Sven

  • Uber Member
  • ******
  • Posts: 1022
    • View Profile
Re: Applescript capabilities in PM5?
« Reply #3 on: September 12, 2012, 09:15:37 AM »
I know, that's a very dirty way, but in the ingest dialog you can reach the "rename ingested photos"-area with pressing the TAB-key twice. You can send the key strokes via script.

But maybe Kirk knows a better solution

Sven
Changed from behind the cam to one who buys images as I started to run. No cam or lens left.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24267
    • View Profile
    • Camera Bits, Inc.
Re: Applescript capabilities in PM5?
« Reply #4 on: September 12, 2012, 10:16:45 AM »
Photo Mechanic is not AppleScript-able.

I know of no better solution than what Sven has offered.

-Kirk

Offline danielmiller

  • Member
  • **
  • Posts: 53
    • View Profile
Re: Applescript capabilities in PM5?
« Reply #5 on: September 12, 2012, 11:49:14 AM »
Bummer. Thanks for the response.