define a text entry field as a variable on a button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
define a text entry field as a variable on a button
Hi!
My subject pretty much says it all. I've been looking online, and unable to locate the answer to this question. I'm trying to put text into a text field on a card, then when clicking a button have the button take the text from that field, and define that text as a variable. If someone has any suggestions, or resources, that I may not have looked into I would greatly appreciate it.
I hope this is clear enough, but please let me know if i've asked this question poorly.
Thanks in advance!
My subject pretty much says it all. I've been looking online, and unable to locate the answer to this question. I'm trying to put text into a text field on a card, then when clicking a button have the button take the text from that field, and define that text as a variable. If someone has any suggestions, or resources, that I may not have looked into I would greatly appreciate it.
I hope this is clear enough, but please let me know if i've asked this question poorly.
Thanks in advance!
Re: define a text entry field as a variable on a button
Hi.
Firstly, where are you with learning LC? Have you made a stack or any sort of application before? I only ask so that if I tell you that in order to put text into a field, you would know how to:
And then if you wanted that other button thing:
Now this does what you wanted, and may I assume from within that handler, you can further process the information in that variable (yourVariable)? Know that as written, the variable will be discarded when the handler ends. If you need to save it, that is another story, and you need to write back.
Craig Newman
Firstly, where are you with learning LC? Have you made a stack or any sort of application before? I only ask so that if I tell you that in order to put text into a field, you would know how to:
Code: Select all
put yourText into field "yourField"
Code: Select all
on mouseUp
put field "yourField" into yourVariable
end mouseUp
Craig Newman
Last edited by dunbarx on Mon Mar 16, 2015 4:37 pm, edited 1 time in total.
Re: define a text entry field as a variable on a button
Hi Sean,
do you mean something like this?
Depending on your needs the var may also be LOCAL.
Here some great learning resources:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
do you mean something like this?
Code: Select all
global the_var_with_the_text_from_field
on mouseiup
put fld "your text field here..." into the_var_with_the_text_from_field
end mouseup
Here some great learning resources:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: define a text entry field as a variable on a button
Klaus.
BEAT YOU!!!
Craig
BEAT YOU!!!

Craig
Re: define a text entry field as a variable on a button
DAMN! 
Your message contains 8 characters. The minimum number of characters you need to enter is 10.

Your message contains 8 characters. The minimum number of characters you need to enter is 10.
Re: define a text entry field as a variable on a button
That worked like a charm! Thank you both for the quick follow up.