-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndigo Job Folder Creator.applescript
39 lines (37 loc) · 1.34 KB
/
Indigo Job Folder Creator.applescript
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
set thePath to choose folder with prompt "Please select the Indigo Preflight folder:"
tell application "System Events"
set selectedPath to get the name of thePath
end tell
if selectedPath is "Indigo Preflight" then
set userCanceled to false
try
set startNumDialog to display dialog Â
"Please enter the first Indigo job number:" buttons {"Cancel", "OK"} Â
default button "OK" cancel button Â
"Cancel" default answer ""
on error number -128
set userCanceled to true
end try
try
set endNumDialog to display dialog Â
"Please enter the last Indigo job number:" buttons {"Cancel", "OK"} Â
default button "OK" cancel button Â
"Cancel" default answer ""
on error number -128
set userCanceled to true
end try
if userCanceled then
display dialog "You have canceled the creation of Indigo job folders. Please relauch the application to try again."
else if button returned of startNumDialog is "OK" and button returned of startNumDialog is "OK" then
set startNum to text returned of startNumDialog
set endNum to text returned of endNumDialog
tell application "Finder"
activate
repeat with i from startNum to endNum
make new folder at thePath with properties {name:i}
end repeat
end tell
end if
else
display alert "You must selected the Indigo Preflight folder in tekserver://AppendIT/Tek-Po's/Indigo Preflight/"
end if