Struggling with this bit too long, trying my luck here.
I'm running a simple task with applescript which is wrapped inside condition:
If application iTerm2
is running.
If the iterm2
is running, then everything is fine and the execution is successful but if iTerm2 is closed then I'm getting the following syntax error:
132:138: syntax error: Expected end of line but found class name. (-2741)
If it matters I'm, running it via Alfred
Here's the script
on run
if application "iTerm2" is running then
tell application "iTerm2"
tell current window
create tab with default profile
end tell
end tell
end if
end run
Any help is much appreciated, thanks