• 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: Michelle Steiner <email@hidden>
  • Date: Sun, 2 Jan 2011 07:20:54 -0700

On Jan 2, 2011, at 7:15 AM, Robert Poland wrote:

> 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

set x to 2

if x is 1 then
	display dialog "X is 1"
	xso1()
else if x is 2 then
	display dialog "x is 2"
	xso2()
end if

on xso1()
	display dialog "xso 1"
end xso1
on xso2()
	display dialog "xso 2"
end xso2

--
In theory, theory and practice are the same.
In practice, they're not. --Yogi Berra

 _______________________________________________
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>)

  • Prev by Date: Re: How to do a goto with Applescript?
  • Next by Date: Re: Accessing/creating mailboxes in Mail.app
  • 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