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: Robert Poland <email@hidden>
- Date: Mon, 10 Jan 2011 11:01:16 -0700
Mark,
I guess I oversimplified the example.
if (x = 1) then
set y to 1
-- and 4 more lines
else if (x = 2) then
set y to 2
-- and 4 more different lines
end if
In my case currently there are around 30 else if statements and 585 lines of code.
After all the passing of information I was able to see where using goto's was not the best way to go.
If anyone would like to dig into this script i've attached an example.
Please be kind with your remarks.
Attachment:
setBounds.zip
Description: Zip archive
> On Jan 10, 2011, at 9:52 AM, Mark J. Reed wrote:
>
>
>
> On Sun, Jan 2, 2011 at 1:39 PM, Robert Poland <email@hidden> wrote:
> Since when is the following not real code?
>
> if (x = 1) then
> set y to 1
> else if (x = 2) then
> set y to 2
> end if
>
> It's not real code because it can be replaced by one line, no goto required:
>
> set y to x
>
> I'm guessing that whatever Gordian knot you're really trying to untie is not trivial enough to be sliced by so dull a blade.
>
> --
> Mark J. Reed <email@hidden>
>
Robert Poland - Fort Collins, CO
_______________________________________________
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