foxygit / doom Log in
commit dd45fd96528fa67a866dfd174714eebb0f94af25
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Fri Mar 16 22:32:53 2018 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Fri Mar 16 22:32:53 2018 -0400

    osx: Fix AppleScript script under High Sierra.

    Some of the old script broke with this new OS release.
---
 pkg/osx/dmgfix | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/pkg/osx/dmgfix b/pkg/osx/dmgfix
index 28671bab..e802a6f7 100755
--- a/pkg/osx/dmgfix
+++ b/pkg/osx/dmgfix
@@ -29,17 +29,25 @@ on run argv
         --activate
         open dmgFile
         delay 1
-        set win to the front Finder window
         set theDisk to disk diskName
-        set the target of win to theDisk
+        open POSIX file "/"

         -- window options:

         set bgfile to file "background.png" of theDisk
-        set the bounds of win to {200, 200, 717, 545}
-        set icon size of icon view options of win to 96
-        set background picture of icon view options of win to bgfile
-        set toolbar visible of win to false
+        set win to the front Finder window
+        tell win
+            set target to theDisk
+            set current view to icon view
+            set sidebar width to 0
+            set toolbar visible to false
+            set statusbar visible to false
+            set bounds to {200, 200, 717, 545}
+        end tell
+        tell icon view options of win
+            set icon size to 96
+            set background picture to bgfile
+        end tell

         -- hide background file: