Re: Code referenced by variable runs but variable undefined
Re: Code referenced by variable runs but variable undefined
- Subject: Re: Code referenced by variable runs but variable undefined
- From: Yvan KOENIG <email@hidden>
- Date: Sat, 8 Jul 2006 18:20:04 +0200
Hello
I would perhaps be useful to introduce these changes:
on imgResize()
tell application "Adobe Photoshop CS"
if (docHeight > docWidth) then
set imgGT1000 to ((docHeight > 1000))
set imgHalfSize to resize image current document height (docHeight * 0.5)
else
set imgGT1000 to ((docWidth > 1000))
set imgHalfSize to resize image current document width (docWidth * 0.5)
end if
end tell
return
imgHalfSize
end imgResize
The handler call and the variables are used in a photoshop tell block and occur in this order:
set imgHalfSize to my imgResize()
repeat while imgGT1000
imgHalfSize
In your original code,the "local variable"
imgHalfSize is seen in the handler mut not outside.
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden