This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevEnvCtrl-Make-Dmg.scpt
executable file
·76 lines (62 loc) · 1.78 KB
/
DevEnvCtrl-Make-Dmg.scpt
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on run (volumeName)
tell application "Finder"
tell disk (volumeName as string)
open
set theXOrigin to 10
set theYOrigin to 60
set theWidth to 577
set theHeight to 386
set theBottomRightX to (theXOrigin + theWidth)
set theBottomRightY to (theYOrigin + theHeight)
set dsStore to "\"" & "/Volumes/" & volumeName & "/" & ".DS_STORE\""
tell container window
set current view to icon view
set toolbar visible to false
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
set statusbar visible to false
end tell
set opts to the icon view options of container window
tell opts
set icon size to 128
set arrangement to not arranged
end tell
set background picture of opts to file "VolumeBackground.png"
-- Positioning
set position of item "DevEnvCtrl" to {150, 245}
-- Application Link Clause
set position of item "Applications" to {450, 245}
close
open
try
with timeout of 1 second
update without registering applications
end timeout
end try
-- Force saving of the size
delay 1
tell container window
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX - 10, theBottomRightY - 10}
end tell
try
with timeout of 1 second
update without registering applications
end timeout
end try
end tell
delay 1
tell disk (volumeName as string)
tell container window
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
end tell
try
with timeout of 1 second
update without registering applications
end timeout
end try
end tell
delay 1
end tell
end run