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

PowerFullMac

macrumors 601
Original poster
Oct 16, 2006
4,000
2
I am new to AppleScript and this is simple code so I am sure someone here can help!

I want to create a dialog box where if you click No it will quit my app but if I click Yes it will do nothing... Can anyone help?

Here is my code ATM, it wont compile.
Code:
display dialog "Wonna do more?" buttons {"No", "Yes"} default button 1
	if button returned of result = "No" then
		tell application "YouTube Video Downloader"
		quit
		end tell
	else
	(* do nothing *)
end clicked
 

lancestraz

macrumors 6502a
Nov 27, 2005
898
0
RI
Is this going to be used in AppleScript Studio? This may or may not work in ASS... (How's that for an abbreviation).
Code:
display dialog "Wonna do more?" buttons {"No", "Yes"} default button 1 cancel button 1
 

PowerFullMac

macrumors 601
Original poster
Oct 16, 2006
4,000
2
Yeah its for AppleScript Studio (well im doing it in XCode, anywho).

Yeah, it worked, thanks :)

But why is AppleScript in ASS (that is a good abreviation) different from normal AppleScript?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.