I have a project to attend to that will take some time. I need to open two Finder windows and my HoudahSpot search window. I have quite a bit of reorganizing to do and I want to have this all open ready for work when I trigger it.
Question is, now to I just tell Finder to open two new windows? Should be easy enough using Applescript. Not seeing how to do this just in KM? After I get the windows launched it should be easy enough to resize them but, when I tell KM to open Finder it complains the Finder is used by OSX and that I may not call it. Shucks.
Thanks
ADDED: I got this done using AppleScript and put the AS in a KM Macro. Still wondering if this is anything KM could do - not as urgently however as my solution works quite well.
Hey @levelbest,
Yes – it can all be done in Keyboard Maestro.
Use an Activate a Specific Application (do not try to open the Finder like it was a file).
Then use a Select or Show a Menu Item action twice to open two Finder windows.
Etcetera.
However – what you’re doing will be smoother and more organic if done with AppleScript.
set winTarget01 to (path to documents folder)
set winTarget02 to (path to downloads folder)
tell application "Finder"
set newWin01 to make new Finder window
tell newWin01
set bounds to {0, 23, 870, 520}
if toolbar visible ≠ true then set toolbar visible to true
set its target to winTarget01
if its current view ≠ list view then set its current view to list view
end tell
set newWin02 to make new Finder window
tell newWin02
set bounds to {0, 521, 870, 1018}
if toolbar visible ≠ true then set toolbar visible to true
set its target to winTarget02
if its current view ≠ list view then set its current view to list view
end tell
set index of newWin01 to 1
end tell
-Chris
Thanks. Yes, Applescript was
the solution for me.
set defaultWindowBounds to {-1200, -500, -1, 100}
tell application "Finder"
activate
make new Finder window
tell front window
if bounds is not defaultWindowBounds then
set bounds to defaultWindowBounds
end if
end tell
end tell
set defaultWindowBounds to {-1200, 120, -1, 700}
tell application "Finder"
activate
make new Finder window
tell front window
if bounds is not defaultWindowBounds then
set bounds to defaultWindowBounds
end if
end tell
end tell
set defaultWindowBounds to {-1200, 720, -1, 1300}
tell application "HoudahSpot"
activate
tell front window
if bounds is not defaultWindowBounds then
set bounds to defaultWindowBounds
end if
end tell
end tell
1 Like