applescript - repeat if exists document x

Jim Sims sims at ezpzapps.com
Thu Mar 12 01:21:23 EDT 2009


Thanks Bernd and Jim Ault! The List is awesome.

The following is exceptional, thanks.

Complete Sainthood will apply if you can do one that returns the path  
to those files  ;-)
I'm sure I asking way too much now.

sims
------------------------------------------------
On Mar 11, 2009, at 11:13 PM, Jim Ault suggested the way to do the  
following:

tell application "Keynote"
	set the docsAsItemList to every slideshow
	--now we have a Applescript list of all the docs
	set docItemCnt to the number of items in docsAsItemList
	
	set nameslistViaWithEach to {}
	repeat with thisDocItem in docsAsItemList
		copy the name of thisDocItem to end of nameslistViaWithEach
	end repeat
	
	--or--------------
	set namesListViaWithX to {}
	repeat with x from 1 to number of items in the docsAsItemList
		copy the name of item x of docsAsItemList to end of namesListViaWithX
	end repeat
	
end tell
set output to docItemCnt

repeat with echItm in docsAsItemList
	set output to output & return & the name of echItm as string
end repeat
--of course this repeat could be done with either of the 3 lists we  
have defined and gathered
--docsAsItemList, nameslistViaWithEach, namesListViaWithX

return output -- this is formatted without quotes except char 1 and  
char -1






More information about the use-livecode mailing list