Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Open 1e finder with folder downloads , Open 2e finder window with Documents folder
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mamekedi" data-source="post: 1438404" data-attributes="member: 268243"><p>Thank you for your support</p><p></p><p>Here my final script:</p><p></p><p></p><p>property finderWidth : 1000 -- MUST BE SMALLER THEN HALF OF THE ACTUAL SCREEN SIZE!</p><p>property finderHeight : 1000</p><p></p><p>tell application "Finder"</p><p> close every window</p><p> set screenBounds to bounds of window of desktop</p><p> set screenWidth to item 3 of screenBounds</p><p> set screenHeight to item 4 of screenBounds</p><p> set centerX to screenWidth / 2</p><p> set centerY to screenHeight / 2</p><p> activate</p><p> set visible of (every process whose visible is true and frontmost is false) to false</p><p> set finder1 to make new Finder window</p><p> set the target of finder1 to path to downloads folder</p><p> set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 15 div 1, centerY + (finderHeight / 2) div 1}</p><p> set the current view of finder1 to list view</p><p> set finder2 to make new Finder window</p><p> set the target of finder2 to disk "MyData"</p><p> set the bounds of finder2 to {centerX + 15, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}</p><p> set the current view of finder2 to list view</p><p>end tell</p></blockquote><p></p>
[QUOTE="mamekedi, post: 1438404, member: 268243"] 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 [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Open 1e finder with folder downloads , Open 2e finder window with Documents folder
Top