• 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: Things I thought I knew, but didn't - variable scope in repeat loops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Things I thought I knew, but didn't - variable scope in repeat loops


  • Subject: Re: Things I thought I knew, but didn't - variable scope in repeat loops
  • From: Ed Stockly <email@hidden>
  • Date: Sun, 28 Dec 2008 17:59:28 -0800

By the way, if you have Script Debugger, you can take all the mystery out of this process. http://www.latenightsw.com/

In debugging mode you can step through each line of this script and see the value of each variable after each line executes.

It will even show you the value of various properties or globals that may share the same name as local variables.

repeat with i from 1 to 2
   repeat with i from 1 to 2
       set i to 3
   end repeat
   display dialog i -- "3" both times
end repeat
display dialog i -- "3"

ES

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Things I thought I knew, but didn't - variable scope in repeat loops (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Things I thought I knew, but didn't - variable scope in repeat loops
  • Next by Date: Re: Thirteen Scripters Scripting
  • Previous by thread: Re: Things I thought I knew, but didn't - variable scope in repeat loops
  • Next by thread: Scripting TextEdit
  • Index(es):
    • Date
    • Thread