Results 1 to 4 of 4
  1. #1
    Open 1e finder with folder downloads , Open 2e finder window with Documents folder

    Member Since
    Aug 18, 2012
    Posts
    2
    Open 1e finder with folder downloads , Open 2e finder window with Documents folder
    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

  2. #2
    Open 1e finder with folder downloads , Open 2e finder window with Documents folder
    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    180
    To select a particular folder, use something like this.

    Code:
    tell application "Finder"
    	activate
    	set finder1 to open (path to downloads folder)    -- line 1
    	set finder2 to open (path to documents folder)    -- line 2
    end tell
    I hav'nt inlcuded any window size or postion code as you have done, so just past the two labeled lines into the bottom of your script, before the end tell.

    Regards Mark

  3. #3
    Open 1e finder with folder downloads , Open 2e finder window with Documents folder

    Member Since
    Aug 18, 2012
    Posts
    2
    Thank you for your support

    Here my final script:


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

    tell application "Finder"
    close every window
    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 target of finder1 to path to downloads folder
    set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 15 div 1, centerY + (finderHeight / 2) div 1}
    set the current view of finder1 to list view
    set finder2 to make new Finder window
    set the target of finder2 to disk "MyData"
    set the bounds of finder2 to {centerX + 15, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}
    set the current view of finder2 to list view
    end tell

  4. #4
    Open 1e finder with folder downloads , Open 2e finder window with Documents folder
    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    180
    Looks Good, Well Done.

    Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 11-20-2014, 01:02 PM
  2. Replies: 0
    Last Post: 08-18-2012, 07:51 AM
  3. Really annoying bug, cant open documents from finder
    By olskar in forum OS X - Operating System
    Replies: 0
    Last Post: 10-13-2009, 08:36 AM
  4. set the small enter key to open file/folder in finder?
    By formatc1702 in forum OS X - Operating System
    Replies: 4
    Last Post: 02-24-2008, 10:36 PM
  5. How to open Finder files in the same window?
    By sgmiller in forum Switcher Hangout
    Replies: 3
    Last Post: 06-06-2006, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •