Hardcoding the "Aperture Hot Folder" script variables
Hello,
I use the Aperture Hot Folder script to monitor a folder on my desktop that I drop images into from my phone. I would like to have the script running all of the time, but I don't want it to ask me for any input when it runs ... I want to have the variables hard coded right into it so that I can launch it at start up and not have to think about it.
This is what it does out of the box:
- Welcome dialog
- Asks for the folder to be monitored
- Asks for the project to import to
- Asks if the files should be in the Library or be referenced
- Lets you know that it's all set up and ready to go.
What I would like it to do is simply launch without prompting for any input or showing any dialogs other than the 'are you sure you want to quit' bit when you quit the script.
I have no scripting experience at all, but in my initial poking around I have gotten to this point easily enough:
- Skips the welcome dialog
- The hot folder is predefined in the script so this dialog is now skipped
- Asks for the project to import to (this is the part I need help with)
- This is predefined as Referenced in the script so this dialog is now skipped
- I've removed the entire 'confirmation' section, yet it seems to come back on it's own, so I need help with that too.
Item #3 that I need help with:
tell application "Aperture"
activate
my generate_projectlist()
set this_path to (choose from list project_paths) as Unicode text
if this_path is "false" then tell me to quit
repeat with i from 1 to the count of project_paths
if this_path is (item i of the project_paths) then
set the project_ID to (item i of the project_IDs)
exit repeat
end if
end repeat
end tell
It produces the list of my existing projects as it's supposed to, but I want to simply hard code the target project into the script here instead.
This is what I tried:
tell application "Aperture"
activate
set the project_ID to "Incoming"
end tell
It skips the process of having me chose the project from a list, however, the script does not work in that files placed in the hot folder to not get imported. I'm assuming it's because I am using the wrong information in setting the variable. The Project is called "Incoming" in Aperture, but I don't know exactly how I should be stating that here.
Item #4 looks like this:
tell application "Aperture"
activate
display dialog "Setup is complete, this applet will stay open and running." & return & return & "To stop this script, make the script applet the frontmost application and choose “Quit” from its Application menu." with title "Setup Completion Dialog" with icon icon_file buttons {"OK"} default button 1 giving up after 15
end tell
I've tried removing it completely, but the confirmation dialog still shows up and when I go back into the script, the above code is somehow back in place.
Any help is greatly appreciated!
-Travis
Aperture 3, Mac OS X (10.7.3)