In a button script:
Code: Select all
on mouseUp
get "1" & comma & "2" & comma & "3" & comma & comma & "4"
answer getPlate(it)
end mouseUp
function getPlate it
switch
case item 2 of it > 1
put "item2" & return after temp
case item 3 of it > 1
put "item3" & return after temp
case item 4 of it > 1
put "item4" & return after temp
put item 4 of it * 10 into tenTimesItem4
case item 5 of it > 1
put "item5" & return after temp
end switch
return temp & return & return & "Item 4 times ten=" && tenTimesItem4
end getPlate
Step through the code if you dare. Could be me, of course.
If I transform the function into an "if" construction, all works just fine.
Craig Newman