rkanter / Open-iTerm-or-Terminal-Here...

Generates an Applescript app that you can put in your Finder toolbar which will open an iTerm or Terminal tab at the current directory.
MIT License
134 stars 17 forks source link

Can’t make «class fvtg» of window 1 of application "Finder" into type alias #2

Closed ksm closed 5 years ago

ksm commented 5 years ago

Hey, I ran ./generate.sh iterm. Put the generated script into my finder toolbar. But whenever I tap on it I get this error:

Screen Shot 2019-04-29 at 11 16 43 AM

Running macOS Mojave 10.14.4.

rkanter commented 5 years ago

Hi,

According to https://apple.stackexchange.com/a/37772, it looks like this happens if the Finder window contains a search result or other "special" thing. I tried that and I get this error too. Is your frontmost Finder window search result, smart folder, etc?

I don't think there's a workaround for this because those places don't really exist in the filesystem (so Terminal can't go there), but I'll look into updating the app sometime this week to make it give a nicer message when this happens.

rkanter commented 5 years ago

a465f0d038057153b024ae127ae814ed34cd25a2 improves this by giving a clearer message about why it can't go there. While I was at it, I also added a check and nicer message when there are no Finder windows.

Please pull the latest and regenerate.

ksm commented 5 years ago

@rkanter Thanks for the update and thank for your work on this project! Nice to see a better error message.

I'm pretty sure I was trying to open a regular directory containing some projects I'm coding on.

When I find some time I'll try to dig in to see if I can get this to work for me.