Position of Icons in a DMG file

Discussion in 'AppleScript' started by sd_dave, Nov 9, 2008.

  1. sd_dave

    sd_dave New Member

    Joined:
    Nov 9, 2008
    Messages:
    1
    I have the following script that customizes a DMG....
    The problem is ... contrary to what the script says.... The icons are NOT located at the coordinates specified. The ones that would be along the top
    are "close".. the lower/right icons are way off. I also notice that if I change the X/Y of the window in the script the position of the icons change.

    What am I doing wrong/missing here? I need to have the icons appear at the specified coordinates relative to the top left corner of the window

    Code:
     
    tell application "Finder"
    tell disk "test_test.dmg"
       open
       tell container window
          set current view to icon view
          set toolbar visible to false
          set statusbar visible to false
          set x to 251
          set y to 220
          set w to 1009
          set h to 612
          set bounds to {x, y, x + w, y + h}
       end tell
       set opts to icon view options of container window
       tell opts
          set shows icon preview to false
          set shows item info to false
          set icon size to 128
          set text size to 16
          set arrangement to not arranged
          set label position to bottom
          set background color to {32639,0,32639}
       end tell
       set position of file "aaa_test01.app" to {25,96}  
       set position of file "aaa_test02.app" to {803,213}
       set position of file "aaa_test03.app" to {585,68}
       set position of file "aaa_test04.app" to {485,388}
       set position of file "aaa_test05.app" to {52,295}
       set position of file "aaa_test06.app" to {792,30}
       set position of file "aaa_test07.app" to {211,51}
       set position of file "aaa_test08.app" to {439,207}
       set position of file "aaa_test09.app" to {823,406}
       set position of file "aaa_test10.app" to {293,391}
       set position of file "aaa_test11.app" to {381,13}
       set position of file "aaa_test12.app" to {214,226}
       set position of file "aaa_test13.app" to {649,443}
       update without registering applications
       delay 5
    end tell
    end tell
    
     
    sd_dave, Nov 9, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. morenuf
    Replies:
    3
    Views:
    671
    morenuf
    Feb 22, 2007
  2. Ockham's Razor

    Position of icons on desktop

    Ockham's Razor, May 31, 2007, in forum: Apps
    Replies:
    5
    Views:
    321
    dorayme
    May 31, 2007
  3. Peter Gorny
    Replies:
    0
    Views:
    274
    Peter Gorny
    Apr 6, 2005
  4. Peter Gorny
    Replies:
    1
    Views:
    280
    Peter Gorny
    Apr 9, 2005
  5. spencer
    Replies:
    5
    Views:
    246
    rudolphreindeer252
    Jan 6, 2009
  6. Ronald Florence

    forcing .dmg to open as icons?

    Ronald Florence, Feb 15, 2004, in forum: Programmer Misc
    Replies:
    3
    Views:
    161
    Miro Jurisic
    Feb 16, 2004
  7. mav blincow
    Replies:
    5
    Views:
    317
    Andy Hewitt
    May 30, 2004
  8. R
    Replies:
    2
    Views:
    1,918
    David Empson
    Jul 25, 2011
Loading...