Re: How to do a goto with Applescript?
Re: How to do a goto with Applescript?
- Subject: Re: How to do a goto with Applescript?
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 10 Jan 2011 19:29:05 -0600
- Acceptlanguage: en-US
- Thread-topic: How to do a goto with Applescript?
Title: Re: How to do a goto with Applescript?
>>>>Never call a variable x. If x is your application's name, then call it myApp.
>>>>We now have the option of using descriptive variable names. Calling variables, i, j, or x is meaningless. Call the variable what it represents. I use the short, but effective prefix of "my" to indicate that it is a local.
Feel free to ignore the above advice.
I (and many others who post to this list) often use single character variables.
When I use them they always refer to an integer used in counting.
repeat with x from 1 to 100
I do limit myself to x,y,z (when counting items in nested lists): go to page z of spread x of document x.
a, b
and
i
>>>preface your globals with a g. This tells you instantly that it is a global. You don't have to think about it, you just know.
>>Like so:
>>gMonitorSize
>>pMonitorSize
This has come up numerous times on this list and there is not general agreement.
It’s generally pretty easy to track the differences between globals and locals in AppleScript.
Plus, those variable names ruin the english-like syntax, and make scripts less readable and understandable.
>>>>You only will become a better programmer when you learn to break these habits.
Not all good habits are created equal.
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