Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mamekedi

macrumors newbie
Original poster
Aug 18, 2012
6
0
hello You all,

i have a applescript script to open 2 finder windows below.
The problem is that i want to open the 1e finder window with the Downloads folder and the 2e finder window with the documents folder.

Can somebody help me, see script below


-- Feel free to copy, modify and redistribute this script any way you like
-- Be careful to run this "AS IS" script on your machine. I've
-- tested it and it works on my iMac but if you don't know what you're doing,
-- you could end up hurting your beloved Mac and the data on it.
-- Cheers, Loek

-- This script opens two finder windows side-by-side
property finderWidth : 900 -- MUST BE SMALLER THEN HALF OF THE ACTUAL SCREEN SIZE!
property finderHeight : 700

tell application "Finder"
set screenBounds to bounds of window of desktop
set screenWidth to item 3 of screenBounds
set screenHeight to item 4 of screenBounds
set centerX to screenWidth / 2
set centerY to screenHeight / 2
activate
set visible of (every process whose visible is true and frontmost is false) to false
set finder1 to make new Finder window
set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 2 div 1, centerY + (finderHeight / 2) div 1}
set the current view of finder1 to column view
set finder2 to make new Finder window
set the bounds of finder2 to {centerX + 2, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}
set the current view of finder2 to column view
end tell
 
Try this:

Code:
property finderWidth : 900 -- MUST BE SMALLER THEN HALF OF THE ACTUAL SCREEN SIZE!
property finderHeight : 700

tell application "Finder"
	set screenBounds to bounds of window of desktop
	set screenWidth to item 3 of screenBounds
	set screenHeight to item 4 of screenBounds
	set centerX to screenWidth / 2
	set centerY to screenHeight / 2
	activate
	set visible of (every process whose visible is true and frontmost is false) to false
	set finder1 to make new Finder window
	-- Downloads folder
	set the target of finder1 to path to downloads folder
	set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 2 div 1, centerY + (finderHeight / 2) div 1}
	set the current view of finder1 to column view
	set finder2 to make new Finder window
	-- Documents folder
	set the target of finder2 to path to documents folder
	set the bounds of finder2 to {centerX + 2, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}
	set the current view of finder2 to column view
end tell
 
Perfect thank you very much

Now i want to open in finder window 2 a folder on a mounted drive
How do i do that
 
Last edited:
Now i want to open in finder window 2 a folder on a mounted drive
How do i do that :confused:
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.