-1

Below is the apple script for opening multiple tab need to call the variable ' i ' between the string how this can be done in bash we use $i to call the variable.

repeat with i from 1 to 2

tell application "iTerm 2"
    tell current window
        create tab with default profile
    end tell
    tell current tab of current window
        set _new_session to last item of sessions
    end tell
    tell _new_session
        select
        set name to d(i)-tech`

Tried to called using Parentheses and $ before the variable 'i'

1 Answers1

0

String concatenation in AppleScript is done with the & operator.

So, your set statement should read: set name to "d" & i & "-tech".

fireshadow52
  • 6,298
  • 2
  • 30
  • 46