• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Code referenced by variable runs but variable undefined
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Code referenced by variable runs but variable undefined (From: polibek <email@hidden>)

  • Prev by Date: Re: Date manipulation
  • Next by Date: Re: Date manipulation
  • Previous by thread: Code referenced by variable runs but variable undefined
  • Next by thread: Re: Code referenced by variable runs but variable undefined
  • Index(es):
    • Date
    • Thread