I have been up all night trying to figure this out and I’m getting nowhere. This works exactly as I would like it to except when pressing Exit then Yes to quit, it loops back the same way it does when you press No. If someone can steer me in the right direction with this and help me with this annoyance I’d greatly appreciate it. I am not interested in doing the quit command without the on quit, as I need it like this to complete the rest of my project. The entire thing works flawless except this tiny flaw. Thanks again!
repeat
tell application "System Events" to set theapps to the name of every application process whose visible is true and name is not "Finder"
set selectedAPP to choose from list theapps cancel button name "Exit" with prompt "which Application?"
set Falsify to result
log Falsify
if Falsify = false then --Cancel
quit
--if onQuit is "No"
else --Selected App
exit repeat
end if
--After onQuit is "No"
end repeat
set convertedName to application (selectedAPP as string) -- after "success"
display dialog "Okie dokie"
on quit
display dialog "Are you sure you want to quit?" buttons {"Yes", "No"}
set onQuit to button returned of the result
if onQuit is "Yes" then
continue quit
else if onQuit is "No" then
end if
end quit