-- Show selection dialog only if more than one or no product was found
if(getfirstparagraphoffound_ooos)is""then
setthechoiceto(choose from listofparagraphsinfound_ooosdefaultitems(getlastparagraphoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
-- The first item is an empty string, if no app was found and no app started with "/Volumes"
-- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes"
if(getfirstitemoffound_ooosas string)is""then
setthechoiceto(choose from listfound_ooosdefaultitems(getseconditemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation
return2--aborted by user
elseif(choiceas string)ischooseMyOwnthen
-- yeah, one needs to use "choose file", otherwise
setthechoiceto(choose from listfound_ooosdefaultitems(getfirstitemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation
return2--aborted by user
...
...
@@ -60,11 +85,12 @@ if (get first paragraph of found_ooos) is "" then
-- set the choice to (get first paragraph of found_ooos)
setthechoiceto(getfirstitemoffound_ooos)
else
setthechoiceto(choose from listofparagraphsinfound_ooosdefaultitems(getfirstparagraphoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
setthechoiceto(choose from listfound_ooosdefaultitems(getfirstitemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation
-- Show selection dialog only if more than one or no product was found
if(getfirstparagraphoffound_ooos)is""then
setthechoiceto(choose from listofparagraphsinfound_ooosdefaultitems(getlastparagraphoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
-- The first item is an empty string, if no app was found and no app started with "/Volumes"
-- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes"
if(getfirstitemoffound_ooosas string)is""then
setthechoiceto(choose from listfound_ooosdefaultitems(getseconditemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation
return2--aborted by user
elseif(choiceas string)ischooseMyOwnthen
-- yeah, one needs to use "choose file", otherwise
setthechoiceto(choose from listfound_ooosdefaultitems(getfirstitemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation
return2--aborted by user
...
...
@@ -58,11 +83,12 @@ if (get first paragraph of found_ooos) is "" then
-- set the choice to (get first paragraph of found_ooos)
setthechoiceto(getfirstitemoffound_ooos)
else
setthechoiceto(choose from listofparagraphsinfound_ooosdefaultitems(getfirstparagraphoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
setthechoiceto(choose from listfound_ooosdefaultitems(getfirstitemoffound_ooos)withpromptlistPromptOKbuttonnamelistOKLabelcancelbuttonnamelistCancelLabel)
ifchoiceisfalsethen
-- do nothing, the user cancelled the installation