• 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: polibek <email@hidden>
  • Date: Sun, 9 Jul 2006 15:05:17 -0500

Kai and Yvan,
Thanks to you guys I'm making progress.  I've changed the script and it runs so that's not an issue but I'd like to make sure I understand what the problem was.
In my original handler I had the line:
"set imgHalfSize to resize image current document width (docWidth * 0.5)" which caused the undefined variable failure. From kai's explanation I gather that, since
photoshop's "resize" command does not return a result, it's as if the command consisted of only "set imgHalfSize to". And conversely Yvans handler 

on imgResize()
set imgGT1000 to ((1200 > 1000))
set imgHalfSize to 2300
return {imgHalfSize, imgGT1000}
end imgResize

works because imgHalfSize is given a normal value.
The underlying problem is that I misunderstood  what I was doing with that variable. So, if the goal is to reference a command that doesn't return a result (like resize image current document width (docWidth * 0.5)), should it be done as script object, handler, or something else? Or is that just not allowed?





 _______________________________________________
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

  • Follow-Ups:
    • Re: Code referenced by variable runs but variable undefined
      • From: kai <email@hidden>
    • Re: Code referenced by variable runs but variable undefined
      • From: Shane Stanley <email@hidden>
References: 
 >Code referenced by variable runs but variable undefined (From: polibek <email@hidden>)
 >Re: Code referenced by variable runs but variable undefined (From: Emmanuel <email@hidden>)
 >Re: Code referenced by variable runs but variable undefined (From: polibek <email@hidden>)
 >Re: Code referenced by variable runs but variable undefined (From: kai <email@hidden>)

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