Put item from “scrolling list field” into variable? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Put item from “scrolling list field” into variable? - Solved
How do I select an item from “scrolling list field” and put it into a variable?
Thanks,
David
Thanks,
David
Last edited by DR White on Wed Jan 22, 2014 2:24 pm, edited 1 time in total.
-
- Posts: 73
- Joined: Mon Nov 12, 2012 4:13 pm
Re: Put item from “scrolling list field” into variable?
Code: Select all
put line 1 of field "yourfieldname" into yourvariablename
Last edited by ChrisMukrow on Wed Jan 22, 2014 1:01 pm, edited 1 time in total.
Re: Put item from “scrolling list field” into variable?
Hi David,
If I understand correctly what you want I think "hilitedlines" is the magic word for you.
Best regards
Jean-Marc
If I understand correctly what you want I think "hilitedlines" is the magic word for you.
Best regards
Jean-Marc
https://alternatic.ch
Re: Put item from “scrolling list field” into variable?
Jean-Marc and Chris,
With each of your help the following code works well:
put hilitedline of field "MotorList" into test1
put line test1 of field "MotorList" into tListItem
Thanks,
David
With each of your help the following code works well:
put hilitedline of field "MotorList" into test1
put line test1 of field "MotorList" into tListItem
Thanks,

David
Re: Put item from “scrolling list field” into variable? - So
I always used:
What is the correct one?
Code: Select all
the selectedtext of me
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Put item from “scrolling list field” into variable? - So
Hi MaxV,
I use rather hilitedlines because the hilitedlines is a best way to store it
Best
Jean-Marc
I use rather hilitedlines because the hilitedlines is a best way to store it
Best
Jean-Marc
https://alternatic.ch
Re: Put item from “scrolling list field” into variable? - So
Hi Max,
both "hilitedline..." and "the selected text of me" are valid and do the job
The difference is that the latter needs less typing.
Best
Klaus
both "hilitedline..." and "the selected text of me" are valid and do the job

The difference is that the latter needs less typing.
Best
Klaus
Re: Put item from “scrolling list field” into variable? - So
This is my script to go to a card. In the scrolling list field there is hilited line "foo".
on mouseUp
get line (the hilitedLines of field "myfield") of field "myfield"
put it into whatcard //so far OK
go to card whatcard //does nothing
end mouseUp
please help
Rob
on mouseUp
get line (the hilitedLines of field "myfield") of field "myfield"
put it into whatcard //so far OK
go to card whatcard //does nothing
end mouseUp
please help
Rob
Re: Put item from “scrolling list field” into variable? - So
Hi Rob,
In the field script this works:
Only the name of the card should be in the field.
Simon
In the field script this works:
Code: Select all
on mouseUp
put the selectedText of me into whatCard
go to card whatcard
end mouseUp
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Put item from “scrolling list field” into variable? - So
Simon,
Your script:
Why not?
here a part of my scrolling field list:
Your script:
Compare it with my script:on mouseUp
put the selectedText of me into whatCard
go to card whatcard
end mouseUp
Both scripts do not work.on mouseUp
get line (the hilitedLines of field "myfield") of field "myfield"
put it into whatcard //so far OK
go to card whatcard //does nothing
end mouseUp
Why not?
here a part of my scrolling field list:
Re: Put item from “scrolling list field” into variable? - So
Hi Rob,
Can you post your stack?
Simon
errr... I'm not actually clairvoyant, Klaus is.Why not?
Can you post your stack?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Put item from “scrolling list field” into variable? - So
How do I post a stack ??Can you post your stack?
It is not accepted as attachment.
If I can get an emailaddress, I can send it.
Re: Put item from “scrolling list field” into variable? - So
Hi Rob,
I think you need at least 10 posting before you can post attachments.
I can offer to take a look at your stack, send it to:
klaus AT major-k.de
Best
Klaus
I think you need at least 10 posting before you can post attachments.
I can offer to take a look at your stack, send it to:
klaus AT major-k.de
Best
Klaus
Re: Put item from “scrolling list field” into variable? - So
When a "go" command fails the reason is placed into the result, so you can check that to see what went wrong.
The error will be in the message box.
Code: Select all
go to card whatcard
put the result
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Put item from “scrolling list field” into variable? - So
Hi friends,
we have solved the puzzle!
There were some strange invsible characters at the end of the lines in the field.
If it would be that easy every time...
Best
Klaus
we have solved the puzzle!
There were some strange invsible characters at the end of the lines in the field.
If it would be that easy every time...

Best
Klaus