Why my script stops?
The goal is to find a card amidst 112 cards in the substack "recepten", where the buttons are highlited like in this field "spec":
Here a picture of card 1 of the substack:
On the right side of this card you see 19 buttons; 4 of them are checked. Each card may show different checked boxes.
I use this script that stops at the line indicated in the script below and sends an errormessage: button "spec": execution error at line 14 (Chunk: no such object) near "fruit", char 17
But there is a button "fruit" as the property inspector confirms. The most top button on the picture.
I hope someone can clear this mistery, that puzzled me the whole day.
Code: Select all
on mouseUp
set lockscreen to true
put "fruit,hartig,indisch,kip,overig,vegetarisch,vis,vlees,zoet,bijgerechten,hapjes,hoofdgerechten.,pasta,salades,soepen,taarten,toetjes,voorgerechten,ovenchotel" into tBtnList ----(names of all 19 buttons)
put number of items of tBtnList into tBtnNumbers
put the selectedText of fld "spec" into tOrgList
put number of cards of stack "recepten" into tRnumber
repeat with i=1 to tRnumber
go card i of stack "recepten"
repeat with b=1 to tBtnNumbers
if hilite of button (item b of tBtnList) = true then ---------------here the execution stops
put name of button (item b of tBtnList) & cr after tNameList
end if
end repeat
sort lines of tNamelist
if tNamelist = tOrglist then
put fld "titel" &cr after tTempfield ------------fld titel is the top field on the picture
end if
end repeat
end mouseUp
Thank you, Rob