Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > In need of help tweaking Apple's "Browse Full Screen" in coverflow script

In need of help tweaking Apple's "Browse Full Screen" in coverflow script
Thread Tools
Dedicated MacNNer
Join Date: Jul 2007
Status: Offline
Reply With Quote
Dec 16, 2008, 01:20 AM
 
Can someone please help me tweak the 'Browse Full Screen' Coverflow script (that I found on Apple's website here, and which I've listed below), so that it works with my dual monitor configuration? This script works great on my laptop which obviously only has only one display connected, but my desktop machine has a 22" 1920x1200 monitor as it's primary (left-side) monitor, and a 30" 2560x1600 Cinema Display (right-side) as the secondary monitor...

This script doesn't work with my current desktop configuration, as it tries blowing up the front window across both monitors...

Any help getting this working for me would be greatly appreciated...my AppleScripting skills are non-existent and so I turn to the gurus of these forums to see if, with the Christmas season of giving upon us someone might feel like helping out a scripting noob with this little project...

Any takers? Pretty please? Ho Ho Ho

Thanks!
Browse Full Screen Script:

Code:
global window_ID tell application "Finder" if the (count of Finder windows) is 0 then error number -128 end tell try -- check window ID set window_ID to (do shell script "defaults read com.applescript.BrowseFullScreen windowID") as integer tell application "Finder" if exists (Finder window id window_ID) then set restore_window to true else set restore_window to false end if end tell on error set restore_window to false end try if restore_window is false then -- STORE THE VISIBLITY STATUS OF THE DOCK tell application "System Events" tell dock preferences if autohide is true then set hidden_status to "YES" else set hidden_status to "NO" end if end tell end tell do shell script ("defaults write com.applescript.BrowseFullScreen dockHidden -bool " & hidden_status) -- STORE THE ID OF THE FRONT FINDER WINDOW tell application "Finder" set window_ID to the id of the front Finder window end tell do shell script ("defaults write com.applescript.BrowseFullScreen windowID -string " & (window_ID as string)) -- STORE THE CURRENT VIEW OF THE FRONT FINDER WINDOW tell application "Finder" set this_view to the current view of Finder window id window_ID if this_view is icon view then set view_value to "0" else if this_view is list view then set view_value to "1" else if this_view is column view then set view_value to "2" else if this_view is flow view then set view_value to "3" end if end tell do shell script ("defaults write com.applescript.BrowseFullScreen currentView -string " & view_value) -- STORE THE BOUNDS OF THE FRONT FINDER WINDOW tell application "Finder" set these_bounds to the bounds of Finder window id window_ID end tell set AppleScript's text item delimiters to "-" set the bounds_string to these_bounds as string set AppleScript's text item delimiters to "" do shell script ("defaults write com.applescript.BrowseFullScreen currentBounds -string " & bounds_string) -- HIDE THE DOCK tell application "System Events" tell dock preferences set autohide to true end tell end tell -- SET WINDOW VIEW tell application "Finder" activate copy bounds of the window of the desktop to {a, b, c, d} tell Finder window id window_ID set properties to {current view:flow view, bounds:{0, 44, c, d}} end tell end tell else set the stored_vew to (do shell script "defaults read com.applescript.BrowseFullScreen currentView") set the stored_bounds to (do shell script "defaults read com.applescript.BrowseFullScreen currentBounds") set AppleScript's text item delimiters to "-" set the bounds_list to every text item of the stored_bounds set AppleScript's text item delimiters to "" copy the bounds_list to {a, b, c, d} tell application "Finder" activate if the stored_vew is "0" then set the current view of Finder window id window_ID to icon view else if the stored_vew is "1" then set the current view of Finder window id window_ID to list view else if the stored_vew is "2" then set the current view of Finder window id window_ID to column view else if the stored_vew is "3" then set the current view of Finder window id window_ID to flow view end if set the bounds of Finder window id window_ID to {a as integer, b as integer, c as integer, d as integer} end tell set the stored_status to (do shell script "defaults read com.applescript.BrowseFullScreen dockHidden") as boolean tell application "System Events" tell dock preferences set autohide to stored_status end tell end tell -- DELETE THE PREFS FILE try set the target_file to the quoted form of (POSIX path of (path to preferences folder from user domain) & "com.applescript.BrowseFullScreen.plist") do shell script ("rm " & target_file) end try (* tell application "Finder" try delete document file "com.applescript.BrowseFullScreen.plist" of (path to preferences folder from user domain) end try end tell *) end if
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:51 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2