var AI = Application ( "Adobe Illustrator CC 2014" ) ; var doc = AI . documents ; var docLength = doc . length ; AI . includeStandardAdditions = true ; AI . displayDialog ( docLength . toString ( ) ) ;