content: use AppleScript version "2.4" -- Yosemite (10.10) or later
  use scripting additions
  use O : script "omnifocus"
  
  on run (argv)
  	main(argv)
  end run
  
  on handle_string(argv)
  	main(argv)
  end handle_string
  
  on main(argv)
  	set pomodoroCount to argv
  	set sel to selectedItems() of O
  	
  	repeat with _sel in sel
  		tell application "OmniFocus"
  			tell default document
  				set root to _sel
  				copy name of root to taskName
  				set name of root to "Pomodoros for " & taskName
  				set sequential of root to true
  				repeat with i from 1 to pomodoroCount
  					tell root to make new task with properties {name:taskName & " (pomodoro " & i & ")"}
  				end repeat
  			end tell
  		end tell
  	end repeat
  end main
  