Display Dialog windows

Hi, I’ve searched and found several posts about displaying dialogs but just haven’t been able to put them together to do what I want…

set myAnswer1 to the button returned of (display dialog "Pick a number" buttons {"1", "2", "3"})

if myAnswer1 is "1" then display dialog "You entered 1" buttons {"A", "B", "C"}
if myAnswer1 is "2" then display dialog "You entered 2" buttons {"D", "E", "F"}
if myAnswer1 is "3" then display dialog "You entered 3" buttons {"G", "H", "I"}

This part works, but I need it to do different things depending on the 2nd round of answers…

ex: If 2nd answer is “A”, then display dialog “IT’s DONE”, if “B”… etc…

Now, to unsimplify (that a word??), this 2nd answer will actually be activating Photoshop and having it do something in regards to which answer was chosen, RGB or CMYK. What I have below works for the 1st option only, the 72dpi, but I don’t know what to add to make the other ones work as well. The 150dpi and 300dpi will have 2 Photoshop parts near the bottom as well I’m sure… just don’t know what I’m missing on the top… hope this makes sense…

on open theFiles
	--choose where to save your eps files
	set theChoice to choose folder with prompt "Choose JPEG file destination."
	
	display dialog "Question 1" buttons {"72 dpi", "150 dpi", "300 dpi"}
	set ANSWER to button returned of result
	if ANSWER is "72 dpi" then display dialog "Question 2" buttons {"RGB", "CMYK"}
	set BIGANSWER to button returned of result
	
	
	set theFiles to theFiles as list
	repeat with aFile in theFiles
		
		tell application "Finder"
			set theFile to aFile as alias
			set theFileName to name of theFile
		end tell
		
		tell application "Adobe Photoshop CS2"
			activate
			set display dialogs to never
			open theFile
			set docRef to the current document
			set docHeight to height of docRef
			set docWidth to width of docRef
			set myOptions to {class:JPEG save options, embed color profile:false, format options:standard, quality:6}
			set docName to name of docRef
			set newFileName to (theChoice as string) & docName
		end tell
		
		
		-- 72dpi  RGB  JPEG
		if BIGANSWER is "RGB" then tell application "Adobe Photoshop CS2"
			tell docRef
				if (mode of docRef is not RGB) then change mode docRef to RGB
				resize image docRef resolution 72
			end tell
			save docRef in file newFileName as JPEG with options myOptions appending lowercase extension with copying
			close docRef without saving
		end tell
		
		-- 72dpi  CMYK  JPEG
		if BIGANSWER is "CMYK" then tell application "Adobe Photoshop CS2"
			tell docRef
				if (mode of docRef is not CMYK) then change mode docRef to CMYK
				resize image docRef resolution 72
			end tell
			save docRef in file newFileName as JPEG with options myOptions appending lowercase extension with copying
			close docRef without saving
		end tell
	end repeat
end open

I even tried this at the top part…

	display dialog "Question 1" buttons {"72 dpi", "150 dpi", "300 dpi"}
	set ANSWER to button returned of result
	if ANSWER is "72 dpi" then set BIGANSWER to the button returned of (display dialog "Question 2" buttons {"RGB", "CMYK"})
	if ANSWER is "150 dpi" then set BIGANSWER2 to the button returned of (display dialog "Question 2" buttons {"RGB", "CMYK"})
	if ANSWER is "300 dpi" then set BIGANSWER3 to the button returned of (display dialog "Question 2" buttons {"RGB", "CMYK"})

Thanks in advance,
Brad

Perhaps you could:

set optionsList to {"72 dpi - RGB", "72 dpi - CMYK", "150 dpi - RGB", "150 dpi - CMYK", "300 dpi - RGB", "300 dpi - CMYK"}
set userOption to (choose from list optionsList with prompt "Choose something...")
--> blah, blah, blah... Eg:

if userOption is false then return

if userOption is {"72 dpi - RGB"} then
	--> blah
else if userOption is {"72 dpi - CMYK"} then
	--> blah	
else if userOption is {"150 dpi - RGB"} then
	--> blah	
...

Could be shorter code, but this one is efficient (I think).

DONE and DONE… that’s all it took, thanks so much jj.

I noticed I could only have 3 buttons on each display, so that was my reasoning for going from one to the next… and I never did anything with a ‘choose from list’ option… so this worked PERFECTLY!

Thanks again,
Brad