content: on alfred_script(q)
      tell application "iTerm"
          set _length to count window
      if _length = 0 then
          create window with default profile
      end if
      set aa to (get miniaturized of current window)
      if aa then
          set miniaturized of current window to false
      end if
      set bb to (get visible of current window)
      if bb is false then
          set visible of current window to true
      end if
      set cc to frontmost
      if cc is false then
          activate
      end if
          (*if _length = 0 then*)
              set theResult to current tab of current window
          (*else
              set theResult to (create tab with default profile) of current window
          end if*)
          write session of theResult text q
      end tell
  end alfred_script