Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the following error #15

Closed
anushavasudev opened this issue Jun 8, 2017 · 9 comments
Closed

Getting the following error #15

anushavasudev opened this issue Jun 8, 2017 · 9 comments

Comments

@anushavasudev
Copy link

.Pokemon-Terminal/./Scripts/background.scpt:39:46: script error: Expected end of line but found identifier. (-2741)

That's the error when I do: pokemon [*****]

@tommcgurl
Copy link

@anushavasudev So I was facing the same issue. Turns out the scripter.py was generating a background.scpt file containing the command tell application "iTerm" when in fact my OS knows iterm2 as "iTerm 2".

To fix this you can edit the following line in the function __terminal_script in .Pokemon-Terminal/scripter.py
Change:

content = "tell application \"iTerm\"\n"

To:

content = "tell application \"iTerm 2\"\n"

Then try running the pokemon **** command again 👍

@Yzchen1994
Copy link

I changed line 10 of scripter.py to
content = "tell application \"iTerm 2\"\n"

And the line 1 of background.scpt has automatically changed to
tell application "iTerm 2"

But I still got the error
/Users/yuzechen/.Pokemon-Terminal/./Scripts/background.scpt:41:48: script error: Expected end of line but found identifier. (-2741)

@tommcgurl
Copy link

@Yzchen1994 Another thing you can try is manually clicking the background.scpt script. Apple script should open and prompt you to select your iterm2 application from the applications folder. Once you select it it should display the script with the correct name.

Use the name that it puts in the script to modify the scripter.py file. In my case the name was "iTerm 2" but yours may be different?

@Yzchen1994
Copy link

@tommcgurl It turns out that the name is "iTerm", but changing back to "iTerm" still causes the error /.Pokemon-Terminal/./Scripts/background.scpt:39:46: script error: Expected end of line but found identifier. (-2741)

@tommcgurl
Copy link

@Yzchen1994 Hmm sorry that didn't work. Is the path to your .Pokemon-Terminal repo listed in the background.scpt file correct?

@tommcgurl
Copy link

Also does that file work when ran through apple scripts?

@Yzchen1994
Copy link

@tommcgurl It works now. I changed "iTerm 2" to "iTerm2"

@tommcgurl
Copy link

Awesome 👍

@anushavasudev
Copy link
Author

@tommcgurl Yes. That fixed it! Thanks a lot :)

@ghost ghost mentioned this issue Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants