Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

guitarmaster18

macrumors regular
Original poster
Mar 27, 2007
158
0
Yeah, i just have a quick applescript question. If you were using something like this:
Code:
set start to display dialog "Test" buttons {"Test"}
                      if button returned of start is "Test" then
                      set start2 to display dialog "Test2" buttons {"Back"}
                      end if
                      if button returned of start2 is "Back" then
how would you put something like "go back to start" or "return to start" to make it go back to the variable "Start"? I need help with this one. You got any ideas?
 
Yeah, i just have a quick applescript question. If you were using something like this:
Code:
set start to display dialog "Test" buttons {"Test"}
                      if button returned of start is "Test" then
                      set start2 to display dialog "Test2" buttons {"Back"}
                      end if
                      if button returned of start2 is "Back" then
how would you put something like "go back to start" or "return to start" to make it go back to the variable "Start"? I need help with this one. You got any ideas?

Code:
repeat
	set aButton to button returned of (display dialog "Start" buttons {"Forward", "Backward"})
	if aButton = "Backward" then
		display dialog "Oops hit a wall"
	else
		set aButton to button returned of (display dialog "End" buttons {"Forward", "Backward"})
		if aButton = "Forward" then exit repeat
	end if
end repeat
display dialog "Escaped"

This is really sort of ugly. Especially if you are doing something complicated with it. What is your plan/goal?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.