Hi proloy,
you need to ZIP the stack(s) before uploading here!
Ich checked your stack, you have grouped some buttons and added a script to the group.
BUT thsi script will never be executed because:
1. You did not add a "trigger", "
mouseup" in this case:
Code: Select all
repeat with x = 1 to number of buttons of grp "Checkboxes"
if the hilite of btn x of grp "Checkboxes" then
put the short name of btn x of grp "Checkboxes" & cr after myList
end if
end repeat
put myList into fld Lower
## QUOTES missing here! -> fld "Lower"
2. The buttons in that group DO however have a "mouseup" script, which will get executed
but NOT the script of the group.
Hint:
A clever naming scheme is half the rent!
So since you want to get a line in a field with a click on the corresponding button,
you should do something like this:
a. Name ALL of your buttons with a SPACE:
Check 1
Check 2
etc...
b. Remove the "mouseup" script from every button!
C. Now you can group ALL of your buttons andf add a mouseup script to the group with this script:
Code: Select all
on mouseup
put the short name of the target into tClickedButton
## Extract line number from clicked button name!
put word 2 of tClickedButton into tTargetLineNumber
## Now do something with -> line tLineNumber of fld "News"
put CR & line tLineNumber of fld "News" after fld ""Lower"
end mouseup
Best
Klaus