Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
Mariasole
- Posts: 235
- Joined: Tue May 07, 2013 9:38 pm
Post
by Mariasole » Fri Apr 24, 2015 10:10 am
Ciao a tutti!
I'm doing another experiment with LC.
It is probably a stupid thing

, I searched the forum but can not find anything (certainly for my fault and my limited English!). How do I run a script in a field?
I have attached an example!
Thanks to everyone if you will help me yet...
Mariasole
( ^..^)ノ
-
Attachments
-
- RunThis.zip
- (1.21 KiB) Downloaded 223 times
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
-
Dixie
- Livecode Opensource Backer

- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
Post
by Dixie » Fri Apr 24, 2015 10:33 am
What are you trying to achieve ?
-
Mariasole
- Posts: 235
- Joined: Tue May 07, 2013 9:38 pm
Post
by Mariasole » Fri Apr 24, 2015 11:14 am
Ciao Dixie!
I'm trying to create a button "programmable" through external files (.txt). The external files contain the code, so that it can not build thousand applications per thousand needs!
Mariasole
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
-
Dixie
- Livecode Opensource Backer

- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
Post
by Dixie » Fri Apr 24, 2015 11:29 am
in the button "runthis"
Code: Select all
on mouseUp
--execute the code of field "EditableCode" ---> pig code!!!!
put fld "editablecode" into temp
set the script of fld "targetfield" to temp
send "mouseUp" to fld "targetfield"
end mouseUp
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10394
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Fri Apr 24, 2015 1:51 pm
Hi.
If I understand correctly, try this. Make a field on a new card. Put this text in it:
answer random(999)
Make a button with this in its script:
Does this help?
Craig Newman
-
Mariasole
- Posts: 235
- Joined: Tue May 07, 2013 9:38 pm
Post
by Mariasole » Mon Apr 27, 2015 9:38 am
Thanks Craig,
I had also tried the "do" function but it did not work

!
I tried the solution of Dixie and it works perfectly

.
Dixie Thanks for your time and for your expertise!
Thanks
Craig for having come to help!
A kiss to you both!
Mariasole
( ^..^)ノ
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
-
Klaus
- Posts: 14267
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Apr 27, 2015 12:33 pm
Hola Mariasole,
Mariasole wrote:I had also tried the "do" function but it did not work!
yep, you can only DO a COMMAND and not a complete script with handlers (mouseup) and included functions!
That's why Dixies advice will be the only solution to your special problem.
Best
Klaus
-
Mariasole
- Posts: 235
- Joined: Tue May 07, 2013 9:38 pm
Post
by Mariasole » Mon Apr 27, 2015 12:45 pm
Caro Klaus!
It 's true! I meant that
in my case "do" does not work!
If I could write with the nuances of my mother tongue!
Thank you all!
Mariasole
( ^..^)ノ
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
-
Klaus
- Posts: 14267
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Apr 27, 2015 1:08 pm
Hola Mariasole,
Mariasole wrote:Caro Klaus!
It 's true! I meant that
in my case "do" does not work!

yes, that's what I meant, too, although I did not explicitely mention it
Mariasole wrote:If I could write with the nuances of my mother tongue!
Don't worry, your post and question were undoubtful!
Best
Klaus