-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetAllVariantsCropping_ForOutputFile.applescript
More file actions
44 lines (40 loc) · 1.11 KB
/
getAllVariantsCropping_ForOutputFile.applescript
File metadata and controls
44 lines (40 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
if application "Capture One 22" is running then
tell application "Capture One 22"
set outputFile to "sv_302953_figure-v117609 copy 327"
set ret to {}
set referenceDate to date ("1/1/1970")
set filterVariant to {}
set listNameNewVariants to {}
set test to {}
repeat with var in variants
tell var
if name contains outputFile then
set varRet to {path of parent image, dimensions of parent image, crop, {rotation of adjustments, orientation of adjustments}}
set varOuts to {}
set test to {}
repeat with output in output events
tell output
if (my FileExists(path)) then
set gmtDate to (date of output) - (time to GMT)
set end of varOuts to {path, (gmtDate - referenceDate) * 1000}
set end of varRet to varOuts
set end of ret to varRet
end if
end tell
end repeat
exit repeat
end if
end tell
end repeat
return ret
end tell
end if
on FileExists(theFile) -- (String) as Boolean
tell application "System Events"
if exists file theFile then
return true
else
return false
end if
end tell
end FileExists