tried search the bbs but couldnt find out why it dont work

I know you can add custom buttons using buttons{“blahs”}

but i have a list dialog and would like to have put some custom buttons on it and some listeners which i know how to do.

The list box is:


set photoList to {"AB", "AF", "CF", "DA", "FS", "GJN", "GJ", "GK", "JC", "KS", "KT"}
set photoList2 to {"MP", "OVW", "RO", "RR", "YY", "YZ", "DG", "NP", "MW", "KM", "XJ"}
set manChoosePhoto to {choose from list photoList with prompt "Please chose the photographer" without multiple selections allowed} as text --
if button returned of result is not ok then
	display dialog "here"
end if

I wanted to just add a button that says not on list so then it loads the other list.

Can this be done? i assume that after the button is made all i have to do is
if button returned of result is “not on List” then
–code for another list, just copied from above
end

You can’t add buttons but here are a couple of ways to work around the issue.

set photoList to {"AB", "AF", "CF", "DA", "FS", "GJN", "GJ", "GK", "JC", "KS", "KT"}
set photoList2 to {"MP", "OVW", "RO", "RR", "YY", "YZ", "DG", "NP", "MW", "KM", "XJ"}
set manChoosePhoto to {choose from list photoList with prompt "Please chose the photographer" cancel button name "Not on list" without multiple selections allowed} as text -- 
if manChoosePhoto is "false" then
	set manChoosePhoto to {choose from list photoList2 with prompt "Please chose the photographer" cancel button name "Not on list" without multiple selections allowed} as text -- 
	if manChoosePhoto is "false" then return -- quit script
end if
display dialog manChoosePhoto

Or:

set photoList to {"AB", "AF", "CF", "DA", "FS", "GJN", "GJ", "GK", "JC", "KS", "KT", "Not on list"}
set photoList2 to {"MP", "OVW", "RO", "RR", "YY", "YZ", "DG", "NP", "MW", "KM", "XJ"}
set manChoosePhoto to {choose from list photoList with prompt "Please chose the photographer" cancel button name "Not on list" without multiple selections allowed} as text -- 
if manChoosePhoto is "Not on list" then
	set manChoosePhoto to {choose from list photoList2 with prompt "Please chose the photographer" without multiple selections allowed} as text -- 
	if manChoosePhoto is "false" then return -- quit script
end if
display dialog manChoosePhoto

– Rob

thanklyou again