• 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: How to do a goto with Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do a goto with Applescript?


  • Subject: Re: How to do a goto with Applescript?
  • From: André Renault <email@hidden>
  • Date: Sun, 2 Jan 2011 09:43:17 -0500

The macosxhints Forums had a discussion here, started by a 'noob' from somewhere in India:

http://hintsforums.macworld.com/showthread.php?t=115073

Goto is just too buggy and unclean, most agree.

On Jan 2, 2011, at 9:39 AM, Robert Poland wrote:

> Thanks André and Michelle,
>
> I guess that's sort of what what I was doing, just thought there might be a better way.
>
> if (x=1) then
> 	set y to 1
> else if (x=2)
> 	set y to 2
> end if
>
> Display dialog "x is = to " & y
>
>
> On Jan 2, 2011, at 7:19 AM, André Renault wrote:
>
> Subroutines are your friend. Or you can set something like this:
>
> if (x=1) then
> 	do something
> 	xsol()
> else if (x=2)
> 	do somethingElse
> 	xsol()
> end if
>
> on xsol()
> 	-- do something
> end xsol
>
> On Jan 2, 2011, at 9:15 AM, Robert Poland wrote:
>
>> Hi,
>>
>> I'm sure this is a waste of time,but...
>>
>> Is there a way to do a goto in Applescript.
>>
>> If x=1 then
>> do something
>> goto xsol
>> else if x=2 then
>> do something
>> goto xsol
>> ...
>> end if
>>
>> TIA,
>>
>> 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
>
>
> 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

References: 
 >How to do a goto with Applescript? (From: Robert Poland <email@hidden>)
 >Re: How to do a goto with Applescript? (From: André Renault <email@hidden>)
 >Re: How to do a goto with Applescript? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: How to do a goto with Applescript?
  • Next by Date: Re: How to do a goto with Applescript?
  • Previous by thread: Re: How to do a goto with Applescript?
  • Next by thread: Re: How to do a goto with Applescript?
  • Index(es):
    • Date
    • Thread