Page 1 of 1
run this ( ^..^)ノ
Posted: Fri Apr 24, 2015 10:10 am
by Mariasole
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
( ^..^)ノ
Re: run this ( ^..^)ノ
Posted: Fri Apr 24, 2015 10:33 am
by Dixie
What are you trying to achieve ?
Re: run this ( ^..^)ノ
Posted: Fri Apr 24, 2015 11:14 am
by Mariasole
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
Re: run this ( ^..^)ノ
Posted: Fri Apr 24, 2015 11:29 am
by Dixie
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
Re: run this ( ^..^)ノ
Posted: Fri Apr 24, 2015 1:51 pm
by dunbarx
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
Re: run this ( ^..^)ノ
Posted: Mon Apr 27, 2015 9:38 am
by Mariasole
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
( ^..^)ノ
Re: run this ( ^..^)ノ
Posted: Mon Apr 27, 2015 12:33 pm
by Klaus
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
Re: run this ( ^..^)ノ
Posted: Mon Apr 27, 2015 12:45 pm
by Mariasole
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
( ^..^)ノ
Re: run this ( ^..^)ノ
Posted: Mon Apr 27, 2015 1:08 pm
by Klaus
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