Page 1 of 1
How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 6:53 am
by cogito
Might be too simple to ask but I'm new
I'd like to get all the menu items (say, some has three choices, some has five choices) of all the buttons on a specific card. Say, I want to put them into a field. When I tested one out by
put the text of button id XXXX into field id XXXX
nothing showed in field id XXXX. What's the simple thing I'm missing^^?
Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 9:16 am
by jmburnod
Hi Cogito,
Welcome to this forum.
I dont understand why it doesn't work
you may try this:
Code: Select all
on getTextofAllBtns
put gettextBtns()
end getTextofAllBtns
function getTextBtns
put the num of btns into nbl
repeat with i = 1 to nbl
get the text of btn i
replace cr with "," in it
put the name of btn i & "," & it into line i of t
end repeat
return t
end getTextBtns
I tested this and it works for me
Best regards
Jean-Marc
Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 10:17 am
by cogito
Hi Jean-Marc, you're the best!!!! I can't thank you enough!
Thank you so much for offering such a wonderful solution!!
Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 12:19 pm
by cogito
Just out of curiosity, if I have a list produced by Jean-Marc's script, will it be possible to reversely put back the choices of menu items into each of the buttons from the list^^?
I should put the (menu items) into "???" of each of the button? menuItem of the button?
Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 1:30 pm
by Klaus
Hi cogito (ergo sum?),
you can of course SET again what you have GET (gotten) before:
Code: Select all
...
set the text of btn "xyz" to (line 1 to 3 of fld "the field with all the menu items")
...
I will leave the extraction of the correct lines for your button(s) from the field up to you
Best
Klaus
Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 3:08 pm
by cogito
Thanks a million, Klaus! Now besides cogito ergo sum, I also learned "I ask, therefore I will know"

Re: How to get all the menu items of all buttons on one card
Posted: Sun Jul 15, 2018 3:16 pm
by dunbarx
Peto itaque ego novi?
Craig
Re: How to get all the menu items of all buttons on one card
Posted: Mon Jul 16, 2018 6:21 am
by cogito
Placueris populo, intelligo
