他のオブジェクトにおいてあるコマンドやスクリプトを利用する方法について
メッセージを他のカードやオブジェクトに送りたいときどうするかについての備忘録。
これは send 命令で行う。大事なのはそのタイミング。
下のスクリプトで、コメントアウトされている(赤いマーカー)が引かれているタイミングで
カードへ移動してしまうと次のsend命令が実行されない。(当然と言えば当然ですが)
on mouseUp
global SYear
--クリックされた行の中身(摘要)をtDayに入れる
put the value of the clickline into tDay
if tDay is empty then exit mouseup
set the itemDelimiter to "."
put item 1 of tDay into tMonth
put item 2 of tDay into tDy
put tMonth&"/"&tDy&"/"&SYear into SDay
lock screen
--go to card "伝票" of stack "chyoubo"
send "SonohinoDen SDay" to card "伝票" of stack "chyoubo"
go to card "伝票" of stack "chyoubo"
end mouseUp
send命令はユーザーが作ったコマンドだけではなく、例えばmouseUpなどを任意のボタンに送ることなども出来る。
フィールドにおいた return in field などにsend “mouseUp” to btn 〇〇 として、ボタンに命令を書いておけば、それを実行させることができる。
