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
    Likes Received:
    0
    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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.