Run it with an error-handler, so you can see if/when the script throws an error.
-Chris
try
tell application "Finder"
set bounds of front window to {10, 50, 1275, 1000}
end tell
on error e number n
set e to e & return & return & "Num: " & n
if n ≠ -128 then
try
tell application (path to frontmost application as text) to set ddButton to button returned of ¬
(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
default button "OK" giving up after 30)
if ddButton = "Copy Error Message" then set the clipboard to e
end try
end if
end try
I’ve upgraded to 10.10.5 and KM 7.0.3 since my OP.
Tried your error handler, Chris, and got an error; ”10000”.
Weird that it sometimes works, but I’m gonna use the KM actions for windows instead.
First I suspected XtraFinder, since it makes the Window Switcher see dupes of Finder windows.
This might be for another thread, but I only use XtraFinder for a couple of things, like automatically adjusting the width of Columns etc, but if it confuses KM and others I think I have to stop using it.
Back to the subject:
The script below behaved like my window position script - it work from time to time.
tell application "Finder" to select (every file of window 1 whose name extension is "ptx")
When I changed it to the following it seems to work all the time:
try
tell application "Finder" to set currentDirectory to target of Finder window 1
end try
tell application "Finder" to select (every file of currentDirectory whose name extension is "ptx")
FYI, I’ve been using TotalFinder for over a year now, and have not noticed any issues. I’m running Yosemite (10.10.5). Maybe they have fixed the issue saw earlier.
There were multiple problems, but you’re right they might have been fixed since I last installed TotalFinder (several years now).
Unfortunately it’s not worth my time to find out, especially since El Capitan breaks TotalFinder (unless you turn off System Integrity Protection aka SIP).