Monday, April 22, 2019

#1 2019-04-09 04:59:37 am

daBee
Member
Registered: 2010-02-09
Posts: 102

Finder Open Window At Location in Column View

Hi folks.

So I want to do just that, but let me break it down:

- open a window with (x,y) origin (this is a location on my multiple-monitor real-estate), with window dimensions.  I can do this already, I'll post below.
- I want this window to park itself at a certain location (this is a SAN directory)

Here's the first part:

Applescript:

tell application "Finder"
   open targetFolder
   set w1 to make new Finder window
   tell w1
       set the current view to column view
   end tell
   activate
end tell

Can this be done?


Filed under: Finder, open folder

Offline

 

#2 2019-04-09 01:18:58 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 671

Re: Finder Open Window At Location in Column View

Hi
If i'm understanding this correctly, something like this maybe, I have three monitors to move things around on and this works well.

Applescript:

tell application "Finder"
   set folder_name to "TEST"
   set main_folder to (make new folder at desktop with properties {name:folder_name})
   set desktop position of main_folder to {1000, 50, 100, 100}
   set current view of container window of main_folder to column view
   open main_folder
   set position of Finder window 1 to {605, 100}
end tell

Last edited by Budgie (2019-04-09 01:20:10 pm)


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

#3 2019-04-09 02:48:09 pm

daBee
Member
Registered: 2010-02-09
Posts: 102

Re: Finder Open Window At Location in Column View

Nope. 

Not make new folders.  Open a folder that's on the SAN, in a positioned window, in column view.

Offline

 

#4 2019-04-11 02:31:57 am

Nigel Garvey
Moderator
From:: Warwickshire, England
Registered: 2002-11-20
Posts: 4851

Re: Finder Open Window At Location in Column View

Assuming the SAN's mounted:

Applescript:

--- Edit these values as required:
set targetFolder to "HFS path:to:folder:"
set targetPosition to {100, 100} -- h,v coordinates (top left origin) of top left-hand corner of window.
-- Or:
-- set targetBounds to {100, 100, 1100, 800} -- h,v,h,v coordinates (ditto) of top left and bottom right corners.

tell application "Finder"
   activate
   set w1 to (make new Finder window to folder targetFolder)
   tell w1
       set {current view, position} to {column view, targetPosition}
       -- Or:
       -- set {current view, bounds} to {column view, targetBounds}
   end tell
end tell

Or perhaps:

Applescript:

-- Edit these values as required:
set targetFolder to "HFS path:to:folder:"
set targetPosition to {100, 100} -- h,v coordinates (top left origin) of top left-hand corner of window.
-- Or:
-- set targetBounds to {100, 100, 1100, 800} -- h,v,h,v coordinates (ditto) of top left and bottom right corners.

tell application "Finder"
   activate
   tell (make new Finder window to folder targetFolder) to set {current view, position} to {icon view, targetPosition}
   -- Or:
   -- tell (make new Finder window to folder targetFolder) to set {current view, bounds} to {icon view, targetBounds}
end tell


NG

Offline

 

#5 2019-04-11 02:44:42 am

daBee
Member
Registered: 2010-02-09
Posts: 102

Re: Finder Open Window At Location in Column View

I tried the latter.  The very reason I want to do this is to mount this actual folder on the SAN volume. 

But it is currently mounted and I tried it.  It said it can't get the folder. 

error "Finder got an error: Can’t get folder \"Volumes:RFstor:storMusic:Music:\"." number -1728 from folder "Volumes:RFstor:storMusic:Music:"

Offline

 

#6 2019-04-11 04:04:28 am

Nigel Garvey
Moderator
From:: Warwickshire, England
Registered: 2002-11-20
Posts: 4851

Re: Finder Open Window At Location in Column View

daBee wrote:

The very reason I want to do this is to mount this actual folder on the SAN volume.


This isn't mentioned in either of your previous posts. You should check out the 'mount volume' command in the StandardAdditions. 

But it is currently mounted and I tried it.  It said it can't get the folder. 

error "Finder got an error: Can’t get folder \"Volumes:RFstor:storMusic:Music:\"." number -1728 from folder "Volumes:RFstor:storMusic:Music:"


HFS paths don't begin with "Volumes". "RFstor:storMusic:Music:".


NG

Offline

 

#7 2019-04-11 07:12:16 am

daBee
Member
Registered: 2010-02-09
Posts: 102

Re: Finder Open Window At Location in Column View

Yes, I know.  Well, yes, it was. 

/Volumes...

is just that.  It was suggested to me that I use HFS.  I wasn't suggesting that at all.  I'm the one asking the question.  But thanks for the guidance.  I'll give it a try.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)