applescript - repeat if exists document x

BNig niggemann at uni-wh.de
Wed Mar 11 17:57:05 EDT 2009


Hi Jim,

you could try:

tell application "Photoshop Elements 4.0"
		set x to count of documents
end tell

I dont have Photoshop Elements but to get the count of documents is pretty
standard applescript. I tested it with safari and it works, it gives the
number of open documents.

regards

Bernd


Jim Sims wrote:
> 
> 
> On Mar 11, 2009, at 9:27 PM, Mark Schonewille wrote:
> 
>> if exists document x then set z to z + 1 else exit repeat
> 
> Bless you Mark.
> Loong day here today.
> 
> -- THIS WORKS!
> set z to 0
> set x to 0
> repeat
> 	tell application "Photoshop Elements 4.0"
> 		set x to x + 1
> 		if exists document x then
> 			set z to z + 1
> 		else
> 			exit repeat
> 		end if
> 		set counter to z
> 	end tell
> 	
> end repeat
> return counter
> 
> sims
> 
> sims at ezpzapps.com
> Skype:   sims.jim
> iChat:   techietours
> ______________________
> Opportunity by Design
> 
> 
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/applescript---repeat-%09if-exists-document-x-tp22463496p22465462.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list