Last active
May 18, 2018 20:03
-
-
Save thnk2wn/0a9f93c64dc99746a457c2ca5e414f07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
do shell script "open /Applications/Preview.app" | |
set importFromPhoneText to "Import from iGeoff" | |
tell application "System Events" to tell process "Preview" | |
set frontmost to true | |
delay 2 | |
click (menu item 1 where its name starts with importFromPhoneText) of menu 1 of menu bar item "File" of menu bar 1 | |
delay 2 | |
click button "Import All" of group 1 of front window | |
set cameraImportPath to "/Users/hudgeo/Desktop/camera" | |
#set myPath to choose folder with prompt importFromPhoneText default location POSIX file cameraImportPath | |
#choose file with prompt "Choose a folder" default location alias myPath | |
keystroke "g" using {shift down, command down} | |
keystroke cameraImportPath | |
delay 1 | |
keystroke return | |
delay 1 | |
keystroke return | |
end tell | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment